webpack failed: Module parse failed: Unexpected token (1:918)
See original GitHub issueWebpack failed then importing setupPlugins
Seems like don’t have webpack loader
I am using babel 6
module: { rules: [ ...styles.loaders({useDevServer: true}), { test: /\.js?$/, exclude: /(node_modules)/, loaders: [ 'babel-loader?presets[]=react,presets[]=es2015,presets[]=stage-0' ] }, { test: /\.(jsx)?$/i, loader: 'babel-loader', options: { presets: [ 'react', 'stage-0', 'es2015', ], comments: false, plugins: [ 'react-hot-loader/babel', 'transform-flow-strip-types', 'transform-class-properties', config.webpack.flowRuntimeEnabled ? ['flow-runtime', { assert: false, warn: false, annotate: true, }] : null, 'transform-decorators-legacy', ].filter((plugin) => plugin != null), }, exclude: [ /node_modules/, /\.(spec|e2e)\.js$/, ], }, ], },
.babelrc
{ "presets": [ "stage-0", "react", "es2015", "flow" ], "env": { "production": { "presets": [ "babili" ] } }, "compact": true, "plugins": [ "transform-flow-strip-types", "transform-react-jsx", "transform-object-rest-spread", "git-version", "transform-class-properties" ] }
Environment
superset version: superset version 0.32.0rc2.dev2 python version: python --version 3.6.7 node.js version: node -v v8.16.0 npm version: npm -v 6.4.1
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (1 by maintainers)
Top GitHub Comments
Hello, I try started it locally, with my webpack config…Update to babel 7 do nothing for me…
{ test: /\.js?$/, exclude: /(node_modules)/, loaders: [ 'babel-loader?presets[]=react,presets[]=es2015,presets[]=stage-0' ] }, { test: /\.(jsx)?$/i, loader: 'babel-loader', options: { presets: [ 'react', 'stage-0', 'es2015', ], comments: false, plugins: [ 'react-hot-loader/babel', 'transform-flow-strip-types', 'transform-class-properties', config.webpack.flowRuntimeEnabled ? ['flow-runtime', { assert: false, warn: false, annotate: true, }] : null, 'transform-decorators-legacy', ].filter((plugin) => plugin != null), }, exclude: [ /node_modules/, /\.(spec|e2e)\.js$/, ], },
Same issue i am facing in superset-ui-plugins demo run. Please help me. how to resolve