forked from bloodorca/hollow
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathwebpack.config.js
More file actions
31 lines (30 loc) · 977 Bytes
/
webpack.config.js
File metadata and controls
31 lines (30 loc) · 977 Bytes
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
var path = require("path")
var HtmlWebpackPlugin = require("html-webpack-plugin")
module.exports = {
entry: "./src/index.js",
output: {
path: path.resolve(__dirname, "docs"),
filename: "bundle.js",
// <<< ADD THIS LINE
// This tells Webpack that on the production server (GitHub Pages),
// all assets are located in the "/silksong-saveeditor/" subfolder.
publicPath: "/silksong-saveeditor/"
},
devtool: 'inline-source-map',
devServer: {
contentBase: "./docs",
port: 8080,
compress: true
},
module: {
rules: [
{ test: /\.js$/, exclude: /node_modules/, loader: "babel-loader" },
{ test: /\.css$/, use: ["style-loader", "css-loader"] } // Changed 'loader' to 'use' for consistency, though both work
]
},
plugins: [
new HtmlWebpackPlugin({ template: './src/index.html' })
],
mode: "development",
target: "web"
}