webpack config

var path = require('path');


module.exports = {

entry: path.join(__dirname, 'index'),

output:{

path: __dirname,

filename: 'bundle.js',

},

module:{

rules:[

{

test: /\.css$/,

loader:['style-loader', 'css-loader']

}

]

}

};

As webpack.config.js file, execute the command:

webpack index.js -o bundle.js --mode=development


Guess you like

Origin blog.51cto.com/hjun169/2400353