forked from jsightapi/online-editor-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config-overrides.js
26 lines (23 loc) · 878 Bytes
/
config-overrides.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
/* config-overrides.js */
/* eslint-disable */
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
module.exports = function override(config, env) {
if (process.env.REACT_VIEW_TYPE === 'doc') {
config.entry = config.entry.replace('index.', 'index.export.');
config.output = {
...config.output, // copy all settings
filename: "static/js/export-[name].js",
chunkFilename: "static/js/[name].chunk.js",
};
config.plugins = [...config.plugins, new MonacoWebpackPlugin({}), new MiniCssExtractPlugin({
filename: "static/css/export-[name].css",
chunkFilename: "static/js/export-[name].css",
ignoreOrder: false,
runtime: true,
})];
} else {
config.plugins = [...config.plugins, new MonacoWebpackPlugin({})];
}
return config;
}