From cede436b962f43aefcafa9d531b759ee6b095b90 Mon Sep 17 00:00:00 2001 From: Pedro Nauck Date: Wed, 14 Nov 2018 22:59:31 -0200 Subject: [PATCH] fix(docz-core): add cache just for non-debug --- packages/docz-core/src/webpack/loaders.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/docz-core/src/webpack/loaders.ts b/packages/docz-core/src/webpack/loaders.ts index fc2827bbc..bd1e5df4c 100644 --- a/packages/docz-core/src/webpack/loaders.ts +++ b/packages/docz-core/src/webpack/loaders.ts @@ -28,7 +28,7 @@ export const js = (config: Config, args: Args, babelrc: any) => { .end() .exclude.add(/node_modules/) .end() - .when(args.debug, addCacheLoader) + .when(!args.debug, addCacheLoader) .use('babel-loader') .loader(require.resolve('babel-loader')) .options(babelrc) @@ -47,7 +47,7 @@ export const mdx = (config: Config, args: Args, babelrc: any) => { .end() .exclude.add(/node_modules/) .end() - .when(args.debug, addCacheLoader) + .when(!args.debug, addCacheLoader) .use('babel-loader') .loader(require.resolve('babel-loader')) .options(babelrc)