@deot/dev-dever 2.0.0 → 2.0.1
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/dist/index.cjs.js +5 -5
- package/dist/index.es.js +3 -3
- package/package.json +1 -1
- package/shared.config.ts +2 -2
package/dist/index.cjs.js
CHANGED
|
@@ -31,7 +31,7 @@ function _interopNamespaceDefault(e) {
|
|
|
31
31
|
const path__namespace = /*#__PURE__*/_interopNamespaceDefault(path);
|
|
32
32
|
const fs__namespace = /*#__PURE__*/_interopNamespaceDefault(fs);
|
|
33
33
|
|
|
34
|
-
const dirname$1 = path__namespace.dirname(node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (document.currentScript && document.currentScript.src || new URL('index.cjs
|
|
34
|
+
const dirname$1 = path__namespace.dirname(node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (document.currentScript && document.currentScript.src || new URL('index.cjs', document.baseURI).href))));
|
|
35
35
|
let target = {
|
|
36
36
|
entries: [],
|
|
37
37
|
html: ""
|
|
@@ -68,7 +68,7 @@ const get = () => {
|
|
|
68
68
|
return target;
|
|
69
69
|
};
|
|
70
70
|
|
|
71
|
-
const dirname = path__namespace.dirname(node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (document.currentScript && document.currentScript.src || new URL('index.cjs
|
|
71
|
+
const dirname = path__namespace.dirname(node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (document.currentScript && document.currentScript.src || new URL('index.cjs', document.baseURI).href))));
|
|
72
72
|
const run = (options) => devShared.Utils.autoCatch(async () => {
|
|
73
73
|
const locals = devShared.Locals.impl();
|
|
74
74
|
if (typeof options.dryRun === "undefined") {
|
|
@@ -101,10 +101,10 @@ const run = (options) => devShared.Utils.autoCatch(async () => {
|
|
|
101
101
|
if (!entries.length)
|
|
102
102
|
return devShared.Shell.spawn(`echo no entry file found!`);
|
|
103
103
|
let options$ = {};
|
|
104
|
-
if (fs$1.existsSync(`${cwd}/dev.config.ts`)) {
|
|
105
|
-
options$.configFile = path__namespace.relative(cwd, path__namespace.resolve(cwd, "./dev.config.ts"));
|
|
106
|
-
} else if (fs$1.existsSync(`${cwd}/z.dev.config.ts`)) {
|
|
104
|
+
if (fs$1.existsSync(`${cwd}/z.dev.config.ts`)) {
|
|
107
105
|
options$.configFile = path__namespace.relative(cwd, path__namespace.resolve(cwd, "./z.dev.config.ts"));
|
|
106
|
+
} else if (fs$1.existsSync(`${cwd}/dev.config.ts`)) {
|
|
107
|
+
options$.configFile = path__namespace.relative(cwd, path__namespace.resolve(cwd, "./dev.config.ts"));
|
|
108
108
|
} else {
|
|
109
109
|
options$.configFile = path__namespace.relative(cwd, path__namespace.resolve(dirname, "../shared.config.ts"));
|
|
110
110
|
}
|
package/dist/index.es.js
CHANGED
|
@@ -77,10 +77,10 @@ const run = (options) => Utils.autoCatch(async () => {
|
|
|
77
77
|
if (!entries.length)
|
|
78
78
|
return Shell.spawn(`echo no entry file found!`);
|
|
79
79
|
let options$ = {};
|
|
80
|
-
if (fs$1.existsSync(`${cwd}/dev.config.ts`)) {
|
|
81
|
-
options$.configFile = path.relative(cwd, path.resolve(cwd, "./dev.config.ts"));
|
|
82
|
-
} else if (fs$1.existsSync(`${cwd}/z.dev.config.ts`)) {
|
|
80
|
+
if (fs$1.existsSync(`${cwd}/z.dev.config.ts`)) {
|
|
83
81
|
options$.configFile = path.relative(cwd, path.resolve(cwd, "./z.dev.config.ts"));
|
|
82
|
+
} else if (fs$1.existsSync(`${cwd}/dev.config.ts`)) {
|
|
83
|
+
options$.configFile = path.relative(cwd, path.resolve(cwd, "./dev.config.ts"));
|
|
84
84
|
} else {
|
|
85
85
|
options$.configFile = path.relative(cwd, path.resolve(dirname, "../shared.config.ts"));
|
|
86
86
|
}
|
package/package.json
CHANGED
package/shared.config.ts
CHANGED
|
@@ -32,7 +32,7 @@ const getHtmlContent = async (url: string) => {
|
|
|
32
32
|
|
|
33
33
|
fullpath = path.join(
|
|
34
34
|
cwd,
|
|
35
|
-
|
|
35
|
+
workspace,
|
|
36
36
|
packageFolderName,
|
|
37
37
|
'examples',
|
|
38
38
|
`${htmlEntry?.replace(/(\.html)/g, '')}.ts`
|
|
@@ -91,6 +91,6 @@ export default defineConfig({
|
|
|
91
91
|
}
|
|
92
92
|
],
|
|
93
93
|
|
|
94
|
-
//
|
|
94
|
+
// 因为virtualHtml不需要入口,这样可以不弹出Skipping dependency pre-bundling.
|
|
95
95
|
optimizeDeps: { entries: [] }
|
|
96
96
|
}) as UserConfig;
|