1 Star 0 Fork 0

cst_kevin/webpack-demo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
webpack.config.js 665 Bytes
一键复制 编辑 原始数据 按行查看 历史
杨文毅 提交于 2017-08-09 16:35 . 模块热替换
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const webpack = require('webpack');
module.exports = {
entry: {
app: './src/index.js'
},
devtool: 'inline-source-map',
devServer: {
contentBase: './dist',
hot: true
},
module:{
rules: [
{
test: /\.css$/,
use: ['style-loader','css-loader']
}
]
},
plugins: [
//new CleanWebpackPlugin(['dist']),
new HtmlWebpackPlugin({title:'Output Management'}),
new webpack.HotModuleReplacementPlugin()
],
output: {
filename: '[name].bundle.js',
path: path.resolve(__dirname,'dist')
},
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/cst_kevin/webpack-demo.git
[email protected]:cst_kevin/webpack-demo.git
cst_kevin
webpack-demo
webpack-demo
master

搜索帮助