webpack.config.js中发生了一些错误

时间:2018-06-30 02:25:24

标签: webpack-4 webpack.config.js

我正在学习webpack 4,但遇到一些错误。 这是我的webpack.config.js

const path = require('path');
const webpack = require('webpack');

module.exports = {
  entry: './src/index.js',
  output: {
    filename: 'main.js',
    path: path.resolve(__dirname, 'dist')
  }
  module:{
    rules:[
      {test:/\.css$/, use:['style-loader','css-loader']}
    ]
  }
};

这是错误:

module:{
  ^^^^^^
SyntaxError: Unexpected identifier
    at NativeCompileCache._moduleCompile    (/Users/meifei/Documents/learn-webpack/node_modules/v8-compile-cache/v8-compile-cache.js:226:18)

0 个答案:

没有答案