@cmmn/tools 1.6.25 → 1.6.26
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/rollup.config.js +3 -2
- package/package.json +3 -2
- package/serve/serve.js +2 -1
package/bundle/rollup.config.js
CHANGED
|
@@ -165,11 +165,11 @@ export class ConfigCreator {
|
|
|
165
165
|
commonjs({
|
|
166
166
|
requireReturnsDefault: "namespace",
|
|
167
167
|
transformMixedEsModules: true,
|
|
168
|
-
defaultIsModuleExports: true
|
|
168
|
+
defaultIsModuleExports: true,
|
|
169
169
|
}),
|
|
170
170
|
nodeResolve({
|
|
171
171
|
browser: this.options.browser,
|
|
172
|
-
dedupe: this.options.dedupe || []
|
|
172
|
+
dedupe: this.options.dedupe || [],
|
|
173
173
|
}),
|
|
174
174
|
sourcemaps(),
|
|
175
175
|
builtins(),
|
|
@@ -280,6 +280,7 @@ export class ConfigCreator {
|
|
|
280
280
|
|
|
281
281
|
},
|
|
282
282
|
plugins: this.plugins,
|
|
283
|
+
preserveEntrySignatures: true,
|
|
283
284
|
treeshake: this.options.minify ? "recommended" : "safest",
|
|
284
285
|
watch: {
|
|
285
286
|
buildDelay: 300,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cmmn/tools",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.26",
|
|
4
4
|
"description": "Compilation, bundling, code generator, testing.",
|
|
5
5
|
"main": "dist/rollup.config.js",
|
|
6
6
|
"type": "module",
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
"@types/sinon": "10.x.x",
|
|
56
56
|
"@web/rollup-plugin-html": "^1.10.1",
|
|
57
57
|
"fast-glob": "^3.2.11",
|
|
58
|
+
"file-uri-to-path": "2.x.x",
|
|
58
59
|
"import-meta-resolve": "2",
|
|
59
60
|
"jest": "27.x.x",
|
|
60
61
|
"less": "^4",
|
|
@@ -82,5 +83,5 @@
|
|
|
82
83
|
},
|
|
83
84
|
"author": "",
|
|
84
85
|
"license": "ISC",
|
|
85
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "c817edf78be83ca444f7eb3ba9516f0faf0f40cc"
|
|
86
87
|
}
|
package/serve/serve.js
CHANGED
|
@@ -3,6 +3,7 @@ import path from "path";
|
|
|
3
3
|
import fs from "fs";
|
|
4
4
|
import liveServer from "live-server";
|
|
5
5
|
import {resolve, moduleResolve} from 'import-meta-resolve';
|
|
6
|
+
import uri2path from "file-uri-to-path";
|
|
6
7
|
|
|
7
8
|
export function serve(...options) {
|
|
8
9
|
const configs = getConfigOptions({
|
|
@@ -56,7 +57,7 @@ const resolveESModule = (rootDir, configs) => async function (req, res, next) {
|
|
|
56
57
|
? await getFileName(refererModule, 'file://' + rootDir + '/package.json')
|
|
57
58
|
: 'file://' + rootDir + '/package.json';
|
|
58
59
|
try {
|
|
59
|
-
const file = (await getFileName(name, root))
|
|
60
|
+
const file = uri2path(await getFileName(name, root));
|
|
60
61
|
var stat = fs.statSync(file);
|
|
61
62
|
|
|
62
63
|
res.writeHead(200, {
|