forked from amochtar/aoc-ranking
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
29 lines (27 loc) · 901 Bytes
/
webpack.config.js
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
const CopyWebpackPlugin = require("copy-webpack-plugin");
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
const package = require("./package.json");
module.exports = {
mode: "development",
plugins: [
new CleanWebpackPlugin(),
new CopyWebpackPlugin([
{ from: "src/addon/icons", to: "icons" },
{
from: "src/addon/manifest.json",
to: "manifest.json",
transform(content, path) {
var manifest = JSON.parse(content.toString());
manifest.version = package.version;
manifestJson = JSON.stringify(manifest, null, 4);
return manifestJson;
}
},
{ from: "src/ranking.css" }
])
],
entry: ["./src/ranking.js"],
output: {
filename: "ranking.js"
}
};