@cmmn/tools 1.7.6 → 1.7.8

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.
@@ -35,7 +35,8 @@ export class ConfigCreator {
35
35
  * outDir: string,
36
36
  * html: string,
37
37
  * browser: boolean,
38
- * dedupe: string[]
38
+ * dedupe: string[],
39
+ * target: string
39
40
  * }}
40
41
  */
41
42
  options;
@@ -170,6 +171,7 @@ export class ConfigCreator {
170
171
  nodeResolve({
171
172
  browser: this.options.browser,
172
173
  dedupe: this.options.dedupe || [],
174
+ preferBuiltins: !this.options.browser
173
175
  }),
174
176
  sourcemaps(),
175
177
  builtins(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmmn/tools",
3
- "version": "1.7.6",
3
+ "version": "1.7.8",
4
4
  "description": "Compilation, bundling, code generator, testing.",
5
5
  "main": "dist/rollup.config.js",
6
6
  "type": "module",
@@ -84,5 +84,5 @@
84
84
  },
85
85
  "author": "",
86
86
  "license": "ISC",
87
- "gitHead": "5667a4b6048613ebe1f40ea8a68ee344c79b534c"
87
+ "gitHead": "987749091022fe3ac114ad5a0ce118c1d46f23bf"
88
88
  }
package/serve/serve.js CHANGED
@@ -21,13 +21,13 @@ export function serve(...options) {
21
21
  .map(([from, to]) => [from, path.resolve(x.rootDir, to)])
22
22
  .concat(configs.map(x => [`/external/${x.package}`,
23
23
  path.join(x.rootDir, x.outDir ?? `dist/bundle/${x.name}.js`)])),
24
- middleware: [resolveESModule(x.rootDir, configs)]
24
+ proxy: Object.entries(x.proxy),
25
+ middleware: [resolveESModule(x.rootDir, configs)].filter(x => x)
25
26
  });
26
27
 
27
28
  })
28
29
 
29
30
  }
30
-
31
31
  function getModuleName(path) {
32
32
  if (!path.startsWith('/external/'))
33
33
  return null;