vike 0.4.249-commit-92f1383 → 0.4.249-commit-d781796
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/node/vite/plugins/pluginStaticReplace/applyStaticReplace.d.ts +12 -5
- package/dist/node/vite/plugins/pluginStaticReplace.js +7 -1
- package/dist/utils/PROJECT_VERSION.d.ts +1 -1
- package/dist/utils/PROJECT_VERSION.js +1 -1
- package/dist/utils/debug.d.ts +1 -1
- package/dist/utils/debug.js +1 -0
- package/package.json +1 -1
|
@@ -110,14 +110,21 @@ type StaticReplace = {
|
|
|
110
110
|
/** Remove target (optional) */
|
|
111
111
|
remove?: RemoveTarget;
|
|
112
112
|
};
|
|
113
|
-
type TransformResult = {
|
|
114
|
-
code: string;
|
|
115
|
-
map: any;
|
|
116
|
-
} | null;
|
|
117
113
|
type TransformInput = {
|
|
118
114
|
code: string;
|
|
119
115
|
id: string;
|
|
120
116
|
env: string;
|
|
121
117
|
options: StaticReplace[];
|
|
122
118
|
};
|
|
123
|
-
declare function applyStaticReplace({ code, id, env, options }: TransformInput): Promise<
|
|
119
|
+
declare function applyStaticReplace({ code, id, env, options }: TransformInput): Promise<{
|
|
120
|
+
code: string;
|
|
121
|
+
map: {
|
|
122
|
+
version: number;
|
|
123
|
+
sources: string[];
|
|
124
|
+
names: string[];
|
|
125
|
+
sourceRoot?: string | undefined;
|
|
126
|
+
sourcesContent?: string[] | undefined;
|
|
127
|
+
mappings: string;
|
|
128
|
+
file: string;
|
|
129
|
+
} | null | undefined;
|
|
130
|
+
} | null>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export { pluginStaticReplace };
|
|
2
|
-
import { assert } from '../utils.js';
|
|
2
|
+
import { assert, createDebug } from '../utils.js';
|
|
3
3
|
import { isViteServerSide_extraSafe } from '../shared/isViteServerSide.js';
|
|
4
4
|
import { applyStaticReplace } from './pluginStaticReplace/applyStaticReplace.js';
|
|
5
5
|
import { buildFilterRolldown } from './pluginStaticReplace/buildFilterRolldown.js';
|
|
6
|
+
const debug = createDebug('vike:staticReplace');
|
|
6
7
|
function pluginStaticReplace(vikeConfig) {
|
|
7
8
|
let config;
|
|
8
9
|
// staticReplaceList
|
|
@@ -48,6 +49,11 @@ function pluginStaticReplace(vikeConfig) {
|
|
|
48
49
|
env,
|
|
49
50
|
options: staticReplaceList,
|
|
50
51
|
});
|
|
52
|
+
if (debug.isActivated && result) {
|
|
53
|
+
debug('id', id);
|
|
54
|
+
debug('before', code);
|
|
55
|
+
debug('after', result.code);
|
|
56
|
+
}
|
|
51
57
|
return result;
|
|
52
58
|
},
|
|
53
59
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PROJECT_VERSION: "0.4.249-commit-
|
|
1
|
+
export declare const PROJECT_VERSION: "0.4.249-commit-d781796";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Automatically updated by @brillout/release-me
|
|
2
|
-
export const PROJECT_VERSION = '0.4.249-commit-
|
|
2
|
+
export const PROJECT_VERSION = '0.4.249-commit-d781796';
|
package/dist/utils/debug.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { createDebug };
|
|
|
2
2
|
export { isDebug };
|
|
3
3
|
export { isDebugError };
|
|
4
4
|
export { debug };
|
|
5
|
-
declare const flags: ["vike", "vike:crawl", "vike:file-change", "vike:error", "vike:esbuild-resolve", "vike:pluginExtractAssets", "vike:pluginExtractExportNames", "vike:glob", "vike:globalContext", "vike:log", "vike:optimizeDeps", "vike:outDir", "vike:pageFiles", "vike:pointer-imports", "vike:requireResolve", "vike:routing", "vike:setup", "vike:stream", "vike:virtualFiles", "vike:vite-rpc"];
|
|
5
|
+
declare const flags: ["vike", "vike:crawl", "vike:file-change", "vike:error", "vike:esbuild-resolve", "vike:pluginExtractAssets", "vike:pluginExtractExportNames", "vike:glob", "vike:globalContext", "vike:log", "vike:optimizeDeps", "vike:outDir", "vike:pageFiles", "vike:pointer-imports", "vike:requireResolve", "vike:routing", "vike:setup", "vike:staticReplace", "vike:stream", "vike:virtualFiles", "vike:vite-rpc"];
|
|
6
6
|
type Flag = (typeof flags)[number];
|
|
7
7
|
type Options = {
|
|
8
8
|
serialization?: {
|
package/dist/utils/debug.js
CHANGED