-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
47 lines (46 loc) · 1.29 KB
/
webpack.config.js
File metadata and controls
47 lines (46 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
const path = require("path");
// const DonePlugin = require("./plugins/DonePlugin");
// const AsyncPlugin = require("./plugins/AsyncPlugin");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const FileListPlugin = require("./plugins/FileListPlugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
// const InlineSourcePlugin = require("./plugins/InlineSourcePlugin");
// const UploadPlugin = require("./plugins/UploadPlugin");
module.exports = {
mode: "development",
entry: "./src/index.js",
output: {
filename: "bundle.js",
path: path.resolve(__dirname, "dist")
},
module: {
rules: [
{
test: /\.css$/,
use: [MiniCssExtractPlugin.loader, "css-loader"]
}
]
},
plugins: [
// new DonePlugin(),
// new AsyncPlugin(),
new HtmlWebpackPlugin({
template: "./src/index.html"
}),
new FileListPlugin({
filename: "list.md"
}),
new MiniCssExtractPlugin({
filename: "main.css"
})
// new InlineSourcePlugin({
// reg: /\.(js|css)$/
// }),
// new UploadPlugin({
// bucket: "", // 对象存储 --> 存储空间
// domain: "",
// accessKey: "pqh2kJeesifWoKwMlBoFpNpnHQ6JXS47bX5O8n9V",
// secretKey: "nn-ZtdsL_J2yH1AcHaPoObXVTy-WZ0hwisFGjoSc"
// })
]
};