forked from cginternals/webgl-operate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.dist.js
29 lines (21 loc) · 1.01 KB
/
webpack.config.dist.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
module.exports = (env, options) => {
const config = require('./webpack.config');
config.cache = false;
config.output.path = __dirname + '/dist';
config.entry = {
'webgl-operate.js': ['polyfill.ts', 'webgl-operate.ts'],
'webgl-operate.slim.js': ['polyfill.ts', 'webgl-operate.slim.ts'],
};
config.module.rules[0].use.options.compilerOptions.noUnusedLocals = true;
config.module.rules[0].use.options.compilerOptions.declaration = false;
config.module.rules[0].use.options.compilerOptions.removeComments = true;
// config.output.library = 'gloperate';
// config.output.libraryTarget = 'umd';
// DISABLE_ASSERTIONS: JSON.stringify(options.mode === 'development'),
config.plugins[0].definitions.DISABLE_ASSERTIONS
= JSON.stringify(false);
// Log verbosity levels: debug = 3, info = 2, warn = 1, error = 0
config.plugins[0].definitions.LOG_VERBOSITY_THRESHOLD
= JSON.stringify(options.mode === 'development' ? 3 : 2);
return config;
};