@cmmn/tools 1.9.1 → 1.9.2

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 CHANGED
@@ -21,6 +21,7 @@ export async function bundle(...options) {
21
21
  }
22
22
  }else {
23
23
  for (let context of contexts) {
24
+ await context.rebuild();
24
25
  await context.dispose();
25
26
  }
26
27
  }
@@ -258,11 +258,12 @@ export class ConfigCreator {
258
258
  outdir: 'dist/bundle',
259
259
  metafile: true,
260
260
  absWorkingDir: this.root,
261
+ treeShaking: this.options.minify,
261
262
  format: ({
262
263
  es: 'esm'
263
264
  })[format] ?? format,
264
265
  outExtension: {
265
- '.js': {
266
+ '.js': (this.options.minify ? '.min' : '') + {
266
267
  es: '.js',
267
268
  cjs: '.cjs'
268
269
  }[format]
@@ -274,6 +275,7 @@ export class ConfigCreator {
274
275
  'process.env.NODE_ENV': '"production"'
275
276
  },
276
277
  publicPath: '/',
278
+ alias: this.options.alias,
277
279
  plugins: [
278
280
  lessLoader(),
279
281
  ...(this.options.html ? [htmlPlugin({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmmn/tools",
3
- "version": "1.9.1",
3
+ "version": "1.9.2",
4
4
  "description": "Compilation, bundling, code generator, testing.",
5
5
  "main": "dist/rollup.config.js",
6
6
  "type": "module",
@@ -64,5 +64,5 @@
64
64
  },
65
65
  "author": "",
66
66
  "license": "ISC",
67
- "gitHead": "56f8e60e50629a425c3abfb1a67e6cc92c90bbf5"
67
+ "gitHead": "2b9d0cf9093d3cde17f2d222604866a2c253ebdc"
68
68
  }