-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdev.config.js
More file actions
50 lines (46 loc) · 1.28 KB
/
dev.config.js
File metadata and controls
50 lines (46 loc) · 1.28 KB
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
48
49
50
const ScalaJS = require("./scalajs.webpack.config");
const { merge } = require('webpack-merge');
const HtmlWebpackPlugin = require("html-webpack-plugin");
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
const WebApp = merge(ScalaJS, {
mode: "development",
entry: [
// Your entry
"./client-fastopt.js",
],
output: {
filename: "client-fastopt-library.js"
},
devtool: 'source-map',
ignoreWarnings: [(warning) => true],
resolve: {
fallback: {
"stream": require.resolve("stream-browserify"),
"buffer": require.resolve('buffer'),
"crypto": require.resolve('crypto-browserify'), //if you want to use this module also don't forget npm i crypto-browserify
}
},
module: {
rules: [
{
test: /\.css$/i,
use: ['style-loader', 'css-loader'],
},
{
test: /\.(woff|woff2|eot|ttf|otf|svg)$/,
use: ['file-loader']
}
]
},
plugins: [
new HtmlWebpackPlugin(),
new MonacoWebpackPlugin({
publicPath: "dev"
})
],
optimization: {
usedExports: true,
sideEffects: true,
},
});
module.exports = WebApp;