@immense/vue-pom-generator 1.0.101 → 1.0.103
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/README.md +26 -0
- package/RELEASE_NOTES.md +11 -30
- package/dist/index.cjs +18 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +18 -13
- package/dist/index.mjs.map +1 -1
- package/dist/plugin/runtime/annotator/plugin.d.ts.map +1 -1
- package/dist/plugin/types.d.ts +5 -4
- package/dist/plugin/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/plugin/runtime/annotator/plugin.ts +21 -16
package/dist/index.mjs
CHANGED
|
@@ -10956,7 +10956,9 @@ function createAnnotatorUiPlugin(options) {
|
|
|
10956
10956
|
});
|
|
10957
10957
|
return {
|
|
10958
10958
|
name: "vue-pom-generator:annotator-ui",
|
|
10959
|
-
apply
|
|
10959
|
+
apply(config, { command }) {
|
|
10960
|
+
return command === "serve" || !config.build?.ssr;
|
|
10961
|
+
},
|
|
10960
10962
|
resolveId(id) {
|
|
10961
10963
|
if (id === ANNOTATOR_CLIENT_VIRTUAL_ID) {
|
|
10962
10964
|
return ANNOTATOR_CLIENT_RESOLVED_ID;
|
|
@@ -10972,8 +10974,8 @@ function createAnnotatorUiPlugin(options) {
|
|
|
10972
10974
|
""
|
|
10973
10975
|
].join("\n");
|
|
10974
10976
|
},
|
|
10975
|
-
transform(code, id) {
|
|
10976
|
-
if (!options.enabled) {
|
|
10977
|
+
transform(code, id, transformOptions) {
|
|
10978
|
+
if (!options.enabled || transformOptions?.ssr) {
|
|
10977
10979
|
return null;
|
|
10978
10980
|
}
|
|
10979
10981
|
const normalizedId = normalizePathSeparators(id);
|
|
@@ -10989,17 +10991,20 @@ ${code}`,
|
|
|
10989
10991
|
map: null
|
|
10990
10992
|
};
|
|
10991
10993
|
},
|
|
10992
|
-
transformIndexHtml
|
|
10993
|
-
|
|
10994
|
-
|
|
10994
|
+
transformIndexHtml: {
|
|
10995
|
+
order: "pre",
|
|
10996
|
+
handler() {
|
|
10997
|
+
if (!options.enabled) {
|
|
10998
|
+
return void 0;
|
|
10999
|
+
}
|
|
11000
|
+
const tag = {
|
|
11001
|
+
tag: "script",
|
|
11002
|
+
attrs: { type: "module" },
|
|
11003
|
+
children: `import ${JSON.stringify(ANNOTATOR_CLIENT_VIRTUAL_ID)};`,
|
|
11004
|
+
injectTo: "body"
|
|
11005
|
+
};
|
|
11006
|
+
return [tag];
|
|
10995
11007
|
}
|
|
10996
|
-
const tag = {
|
|
10997
|
-
tag: "script",
|
|
10998
|
-
attrs: { type: "module" },
|
|
10999
|
-
children: `import ${JSON.stringify(ANNOTATOR_CLIENT_VIRTUAL_ID)};`,
|
|
11000
|
-
injectTo: "body"
|
|
11001
|
-
};
|
|
11002
|
-
return [tag];
|
|
11003
11008
|
}
|
|
11004
11009
|
};
|
|
11005
11010
|
}
|