@octohash/vite-config 0.2.0 → 0.2.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/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # @octohash/vite-config
2
2
 
3
3
  [![npm version][npm-version-src]][npm-version-href]
4
- [![npm downloads][npm-downloads-src]][npm-downloads-href]
5
- [![bundle][bundle-src]][bundle-href]
6
4
  [![JSDocs][jsdocs-src]][jsdocs-href]
7
5
  [![License][license-src]][license-href]
8
6
 
@@ -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.12.4_typescript@5.8.3/node_modules/tsdown/esm-shims.js
36
+ //#region node_modules/.pnpm/tsdown@0.12.9_typescript@5.8.3/node_modules/tsdown/esm-shims.js
37
37
  var getFilename, getDirname, __dirname, __filename;
38
- var init_esm_shims = __esm({ "node_modules/.pnpm/tsdown@0.12.4_typescript@5.8.3/node_modules/tsdown/esm-shims.js"() {
38
+ var init_esm_shims = __esm({ "node_modules/.pnpm/tsdown@0.12.9_typescript@5.8.3/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-BFgucRO_.js";
1
+ import { __dirname, init_esm_shims } from "./esm-shims-8z_NfQi2.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: { handler: (_options, bundle) => {
118
- for (const [, fileContent] of Object.entries(bundle)) if (fileContent.type === "chunk" && fileContent.isEntry) {
119
- const chunkContent = fileContent;
120
- const content = chunkContent.code;
121
- const updatedContent = `${licenseText}${EOL}${content}`;
122
- fileContent.code = updatedContent;
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-CWm9aJTf.js");
265
+ const module = await import("./vite-BZ52gTq1.js");
263
266
  return [module.default(typeof i18n === "boolean" ? {
264
267
  compositionOnly: true,
265
268
  fullInstall: true,