-
Notifications
You must be signed in to change notification settings - Fork 16
/
webpack.vscode.config.js
50 lines (48 loc) · 1.31 KB
/
webpack.vscode.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
45
46
47
48
49
50
const { composePlugins, withNx } = require('@nx/webpack');
/**
* ABOUT
*
* Base webpack file for our apps that need webpack
*
* Some issue migrating where this is something that should be set for anything
* that builds using webpack.
*
* Setting this up for a shared webpack file that all of the other configs can use
*/
// Nx plugins for webpack.
module.exports = composePlugins(withNx(), (config) => {
/**@type WebpackConfig*/
const newConfig = {
...config,
externals: {
vscode: 'commonjs vscode', // ignored because it doesn't exist
},
// trying to work around https://github.com/facebook/create-react-app/pull/11752
// ignoreWarnings: [/^warning/i],
// stats: 'none',
// devtool: 'none',
// plugins: [
// new webpack.SourceMapDevToolPlugin({
// exclude: [/vscode-languageserver/i],
// }),
// ],
// stats: {
// hash: true,
// timings: false,
// cached: false,
// cachedAssets: false,
// modules: false,
// warnings: false,
// errors: true,
// colors: true,
// chunks: true,
// assets: false,
// chunkOrigins: false,
// chunkModules: false,
// children: false,
// reasons: false,
// }
};
// console.log(JSON.stringify(config, undefined, 2));
return newConfig;
});