-
Notifications
You must be signed in to change notification settings - Fork 2
/
webpack.config.cjs
47 lines (41 loc) · 1.06 KB
/
webpack.config.cjs
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 HtmlWebpackPlugin = require('html-webpack-plugin')
const nodeExternals = require('webpack-node-externals');
module.exports = {
mode: 'development',
entry: {
main: './src/app-client.js',
// server: './src/app-server.js',
},
output: {
filename: 'index.js',
},
watchOptions: {
ignored: '/node_modules/',
},
plugins: [
new HtmlWebpackPlugin({
template: "src/server/html/template.html"
})
],
module: {
rules: [
{
test: /\.(css)$/,
use: [
{
loader: "style-loader",
options: { injectType: "singletonStyleTag" },
},
'css-loader'
],
},
{
test: /\.(png|jpe?g|gif|glb|gltf|fbx|tga|ogg|mp3|wav|ttf)$/i,
loader: 'file-loader',
options: {
name: '[path][name].[ext]',
}
}
],
},
};