-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.mjs
39 lines (35 loc) · 1009 Bytes
/
webpack.config.mjs
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
import ScalaJSConfig from './scalajs.webpack.config.js';
import {merge} from 'webpack-merge';
var local = {
devtool: false,
devServer: {
compress: true,
https:true,
headers: {
"Access-Control-Allow-Origin": "*"
},
},
performance: {
// See https://github.com/scalacenter/scalajs-bundler/pull/408
// and also https://github.com/scalacenter/scalajs-bundler/issues/350
hints: false
},
module: {
rules: [
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
type: 'javascript/auto',
},
{
test: /\.(eot|ttf|woff(2)?|svg|png|glb|jpeg|jpg|mp4|jsn)$/,
type: 'asset/resource',
generator: {
filename: 'static/[hash][ext][query]'
}
// use: 'file-loader',
}
]
}
};
export default merge(ScalaJSConfig, local)