KirillYoYo opened a new issue #7659: webpack failed: Module parse failed: 
Unexpected token (1:918)
URL: https://github.com/apache/incubator-superset/issues/7659
 
 
   Webpack failed then importing setupPlugins
   
   
![image](https://user-images.githubusercontent.com/26794095/59024092-caf48480-8859-11e9-944d-3db9951b702b.png)
   
   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
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to