@octohash/vite-config 0.2.0 → 0.2.2
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 +0 -2
- package/dist/{esm-shims-BFgucRO_.js → esm-shims-CLMD_LGJ.js} +2 -2
- package/dist/index.js +12 -9
- package/dist/{vite-CWm9aJTf.js → vite-D44mTpAn.js} +42641 -17610
- package/package.json +24 -24
package/README.md
CHANGED
|
@@ -33,9 +33,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
33
33
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
34
34
|
|
|
35
35
|
//#endregion
|
|
36
|
-
//#region node_modules/.pnpm/tsdown@0.
|
|
36
|
+
//#region node_modules/.pnpm/tsdown@0.13.3_typescript@5.9.2/node_modules/tsdown/esm-shims.js
|
|
37
37
|
var getFilename, getDirname, __dirname, __filename;
|
|
38
|
-
var init_esm_shims = __esm({ "node_modules/.pnpm/tsdown@0.
|
|
38
|
+
var init_esm_shims = __esm({ "node_modules/.pnpm/tsdown@0.13.3_typescript@5.9.2/node_modules/tsdown/esm-shims.js"() {
|
|
39
39
|
getFilename = () => fileURLToPath(import.meta.url);
|
|
40
40
|
getDirname = () => path.dirname(getFilename());
|
|
41
41
|
__dirname = /* @__PURE__ */ getDirname();
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __dirname, init_esm_shims } from "./esm-shims-
|
|
1
|
+
import { __dirname, init_esm_shims } from "./esm-shims-CLMD_LGJ.js";
|
|
2
2
|
import { isPackageExists } from "local-pkg";
|
|
3
3
|
import { defineConfig as defineConfig$1, mergeConfig } from "vite";
|
|
4
4
|
import { existsSync } from "node:fs";
|
|
@@ -114,14 +114,17 @@ async function LicensePlugin(options) {
|
|
|
114
114
|
name: "vite-plugin-license",
|
|
115
115
|
enforce: "post",
|
|
116
116
|
apply: "build",
|
|
117
|
-
generateBundle: {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
|
|
117
|
+
generateBundle: {
|
|
118
|
+
order: "post",
|
|
119
|
+
handler: (_options, bundle) => {
|
|
120
|
+
for (const [, fileContent] of Object.entries(bundle)) if (fileContent.type === "chunk" && fileContent.isEntry) {
|
|
121
|
+
const chunkContent = fileContent;
|
|
122
|
+
const content = chunkContent.code;
|
|
123
|
+
const updatedContent = `${licenseText}${EOL}${content}`;
|
|
124
|
+
fileContent.code = updatedContent;
|
|
125
|
+
}
|
|
123
126
|
}
|
|
124
|
-
}
|
|
127
|
+
}
|
|
125
128
|
};
|
|
126
129
|
}
|
|
127
130
|
async function generateLicenseText(options) {
|
|
@@ -259,7 +262,7 @@ async function loadVuePlugins(projectType, options) {
|
|
|
259
262
|
{
|
|
260
263
|
condition: !!i18n,
|
|
261
264
|
plugins: async () => {
|
|
262
|
-
const module = await import("./vite-
|
|
265
|
+
const module = await import("./vite-D44mTpAn.js");
|
|
263
266
|
return [module.default(typeof i18n === "boolean" ? {
|
|
264
267
|
compositionOnly: true,
|
|
265
268
|
fullInstall: true,
|