1 Star 0 Fork 0

linqinghu/webpack-multiPage-config

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
webpack.config.js 973 Bytes
一键复制 编辑 原始数据 按行查看 历史
linqinghu 提交于 2020-01-08 16:38 +08:00 . '.'
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const {CleanWebpackPlugin} = require('clean-webpack-plugin');
module.exports = {
mode: "development",
entry: './src/index.js',
output: {
filename: "[name]-[hash:8].js",
path: path.resolve(__dirname, 'dist')
},
module: {
rules: [
{test: /\.css$/, use: ['style-loader', 'css-loader', 'postcss-loader']},
{test: /\.less/i, use: ['style-loader', 'css-loader', 'less-loader']},
{
test: /\.jsx?/i,
exclude: '/node_modules/',
use: [
{
loader: "babel-loader", options: {
presets: ['@babel/preset-env']
}
}
]
}
]
},
devtool: "source-map",
plugins: [
new HtmlWebpackPlugin({
title: "Webpack 测试配置",
template: "./public/index.html"
}),
new CleanWebpackPlugin()
],
devServer: {
port: 8090,
open: true
}
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/linqinghu/webpack-multiPage-config.git
git@gitee.com:linqinghu/webpack-multiPage-config.git
linqinghu
webpack-multiPage-config
webpack-multiPage-config
master

搜索帮助