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',
options: {
generatorOpts: {
@ -35,13 +35,6 @@ const babelLoader = (mode) => ({
['@babel/plugin-syntax-decorators', { legacy: true }],
'@babel/plugin-syntax-dynamic-import',
'@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([
mode !== 'production' ? babelHotLoader : undefined,
tsLoader(env),
babelLoader(mode),
babelLoader(),
]),
exclude: [/node_modules/],
},