chore: fix demo webpack config

This commit is contained in:
Roman Hotsiy 2020-08-18 13:05:51 +03:00
parent 8e5a5e8a83
commit a3b98177a1
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0

View File

@ -24,7 +24,7 @@ const tsLoader = (env) => ({
}, },
}); });
const babelLoader = (mode) => ({ const babelLoader = () => ({
loader: 'babel-loader', loader: 'babel-loader',
options: { options: {
generatorOpts: { generatorOpts: {
@ -35,13 +35,6 @@ const babelLoader = (mode) => ({
['@babel/plugin-syntax-decorators', { legacy: true }], ['@babel/plugin-syntax-decorators', { legacy: true }],
'@babel/plugin-syntax-dynamic-import', '@babel/plugin-syntax-dynamic-import',
'@babel/plugin-syntax-jsx', '@babel/plugin-syntax-jsx',
[
'babel-plugin-styled-components',
{
minify: true,
displayName: mode !== 'production',
},
],
]), ]),
}, },
}); });
@ -111,7 +104,7 @@ export default (env: { playground?: boolean; bench?: boolean } = {}, { mode }) =
use: compact([ use: compact([
mode !== 'production' ? babelHotLoader : undefined, mode !== 'production' ? babelHotLoader : undefined,
tsLoader(env), tsLoader(env),
babelLoader(mode), babelLoader(),
]), ]),
exclude: [/node_modules/], exclude: [/node_modules/],
}, },