webpack config

var path = require('path');css


module.exports = {webpack

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

output:{ide

path: __dirname,ui

filename: 'bundle.js',spa

},it

module:{class

rules:[test

{require

test: /\.css$/,

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

}

]

}

};

webpack.config.js文件如上,執行命令:

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

相關文章
相關標籤/搜索