-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprod.config.js
44 lines (42 loc) · 1.24 KB
/
prod.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
32
33
34
35
36
37
38
39
40
41
42
43
44
const ScalaJS = require("./scalajs.webpack.config");
const { merge } = require('webpack-merge');
const HtmlWebpackPlugin = require("html-webpack-plugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
const WebApp = merge(ScalaJS, {
mode: "production",
output: {
filename: "box-app.js",
publicPath: "bundle/"
},
stats: {
warningsFilter: (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 MiniCssExtractPlugin({}),
new MonacoWebpackPlugin({
publicPath: "bundle"
})
]
});
module.exports = WebApp;