加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
webpack.config.js 958 Bytes
一键复制 编辑 原始数据 按行查看 历史
rgb613 提交于 2022-01-03 21:12 . [t0]reac源码调试环境搭建
const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
module.exports = {
mode: "development",
entry: './src/index.js',
output: {
filename: 'index.js',
path: path.resolve(process.cwd(), 'dist')
},
module: {
rules: [
{
test: /\.js$/,
include: [
path.resolve(process.cwd(), "src")
],
exclude: /node_modules/,
loader: "babel-loader",
options: {
presets: ['@babel/preset-react']
}
},
]
},
devServer: {
static: path.join(process.cwd(), "dist"),
compress: true,
port: 9000,
liveReload: true,
hot: true
},
plugins: [
new HtmlWebpackPlugin({
template: "./src/index.html"
})
]
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化