@cmmn/tools 2.0.2 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/bundle.js +1 -0
- package/bundle/esbuild.config.js +3 -2
- package/compile/tsconfig.json +1 -1
- package/package.json +1 -1
package/bundle/bundle.js
CHANGED
|
@@ -9,6 +9,7 @@ export async function bundle(...options) {
|
|
|
9
9
|
minify: options.includes('--minify'),
|
|
10
10
|
prod: options.includes('--prod'),
|
|
11
11
|
stats: options.includes('--stats'),
|
|
12
|
+
noSideEffects: options.includes('--no-side-effects')
|
|
12
13
|
});
|
|
13
14
|
const configs = configOptions.flatMap(x => new ConfigCreator(x).getConfig());
|
|
14
15
|
const contexts = [];
|
package/bundle/esbuild.config.js
CHANGED
|
@@ -28,6 +28,7 @@ export class ConfigCreator {
|
|
|
28
28
|
* target: string
|
|
29
29
|
* prod: boolean,
|
|
30
30
|
* inject: string
|
|
31
|
+
* noSideEffects: boolean
|
|
31
32
|
* }}
|
|
32
33
|
*/
|
|
33
34
|
options;
|
|
@@ -156,7 +157,7 @@ export class ConfigCreator {
|
|
|
156
157
|
plugins: [
|
|
157
158
|
lessLoader(),
|
|
158
159
|
...this.getHtmlPlugin(),
|
|
159
|
-
{
|
|
160
|
+
...(this.options.noSideEffects ? [{
|
|
160
161
|
name: 'no-side-effects',
|
|
161
162
|
setup(build){
|
|
162
163
|
build.onResolve({ filter: /.*/ }, async args => {
|
|
@@ -170,7 +171,7 @@ export class ConfigCreator {
|
|
|
170
171
|
return result
|
|
171
172
|
})
|
|
172
173
|
}
|
|
173
|
-
}
|
|
174
|
+
}] : [])
|
|
174
175
|
],
|
|
175
176
|
})));
|
|
176
177
|
}
|
package/compile/tsconfig.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"disableReferencedProjectLoad": true,
|
|
19
19
|
"disableSourceOfProjectReferenceRedirect": true,
|
|
20
20
|
"allowSyntheticDefaultImports": true,
|
|
21
|
-
"emitDecoratorMetadata": true
|
|
21
|
+
"emitDecoratorMetadata": true,
|
|
22
22
|
"noEmitHelpers": true,
|
|
23
23
|
"declarationDir": "./dist/typings",
|
|
24
24
|
"esModuleInterop": true,
|