-
Notifications
You must be signed in to change notification settings - Fork 2
/
webpack.config.js
31 lines (31 loc) · 994 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
30
31
const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const { LoaderOptionsPlugin } = require("webpack");
module.exports = {
mode: "development",
entry: {
main: path.resolve(__dirname, "src/app.js"),
three: path.resolve(__dirname, "src/three.js"),
},
output: {
path: path.resolve(__dirname, "build"),
filename: "[name].[contenthash].js",
clean: false,
},
module: {
rules: [
{test: /\.s[ac]ss$/i, use: ["style-loader","css-loader","sass-loader"]},
{test: /\.(svg|png|ico|wepg|jpg|jpeg|gif)$/, use: ["asset/resource"]},
]
},
devtool: "inline-source-map",
devServer: {
watchFiles: path.resolve(__dirname, "build"),
compress: true,
port: 8080,
open: true,
hot: true,
liveReload: true
},
plugins:[new HtmlWebpackPlugin({title:"s0xiety.x",file: "index.html", template: "public/app.html"})]
};