@hiscovega/vundle 0.0.12 → 0.0.14

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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.14](https://github.com/griddo/griddo-bundler/compare/v0.0.13...v0.0.14) (2026-01-21)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **vite:** remove build warnings and harden externals ([1b95862](https://github.com/griddo/griddo-bundler/commit/1b9586219354627837e8fd8165151ce62960ebfe))
9
+
10
+ ## [0.0.13](https://github.com/griddo/griddo-bundler/compare/v0.0.12...v0.0.13) (2025-11-10)
11
+
3
12
  ## [0.0.12](https://github.com/griddo/griddo-bundler/compare/v0.0.11...v0.0.12) (2025-10-16)
4
13
 
5
14
  ## [0.0.11](https://github.com/griddo/griddo-bundler/compare/v0.0.10...v0.0.11) (2025-09-24)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hiscovega/vundle",
3
- "version": "0.0.12",
3
+ "version": "0.0.14",
4
4
  "description": "Master bundler configuration for Griddo Instance projects",
5
5
  "main": "vite.config.mjs",
6
6
  "module": "vite.config.mjs",
@@ -8,11 +8,11 @@
8
8
  "type": "module",
9
9
  "exports": {
10
10
  ".": {
11
- "types": "./vite.config.mjs",
11
+ "types": "./types/client-config.d.ts",
12
12
  "import": "./vite.config.mjs"
13
13
  },
14
14
  "./vite.config": {
15
- "types": "./vite.config.mjs",
15
+ "types": "./types/client-config.d.ts",
16
16
  "import": "./vite.config.mjs"
17
17
  },
18
18
  "./plugins": {
package/vite.config.mjs CHANGED
@@ -5,6 +5,16 @@ import { plugins as masterPlugins } from "./plugins/index.mjs";
5
5
  export default defineConfig(async ({ command, mode }) => {
6
6
  let clientConfig = {};
7
7
 
8
+ const sharedAssetFileNames = (assetInfo) => {
9
+ if (assetInfo.name?.endsWith(".css")) {
10
+ return "builder.css";
11
+ }
12
+ if (assetInfo.name?.match(/\.(png|jpe?g|gif|webp)$/)) {
13
+ return "assets/[name]-[hash][extname]";
14
+ }
15
+ return "assets/[name]-[hash][extname]";
16
+ };
17
+
8
18
  // Usamos la función nativa de Vite para encontrar, cargar y transpilar
9
19
  // la configuración del cliente, soportando .ts, .js, .mjs, etc.
10
20
  try {
@@ -35,7 +45,10 @@ export default defineConfig(async ({ command, mode }) => {
35
45
  // --- Configuración Base del Master ---
36
46
  const masterConfig = {
37
47
  logLevel: "warn",
38
- publicDir: "static",
48
+ // El copiado de assets lo gestiona `vite-plugin-static-copy` y además
49
+ // `copyPublicDir` está desactivado; evitamos confusiones deshabilitando
50
+ // `publicDir` explícitamente.
51
+ publicDir: false,
39
52
  define: { global: "globalThis" },
40
53
  plugins: masterPlugins,
41
54
  build: {
@@ -46,14 +59,20 @@ export default defineConfig(async ({ command, mode }) => {
46
59
  builder: resolve(process.cwd(), "src/builder.jsx"),
47
60
  "griddo.config": resolve(process.cwd(), "src/griddo.config.ts"),
48
61
  },
49
- formats: ["es"],
50
62
  name: "GriddoInstance",
51
63
  },
52
64
  rollupOptions: {
53
65
  preserveEntrySignatures: "strict",
54
66
  external: (id) => {
55
67
  // 1. Reglas 'external' del master (no se pueden sobreescribir)
56
- const masterRules = ["@griddo/core", "react", "react-dom", "react/jsx-runtime", "prop-types"];
68
+ const masterRules = [
69
+ "@griddo/core",
70
+ "react",
71
+ "react-dom",
72
+ "react/jsx-runtime",
73
+ "react/jsx-dev-runtime",
74
+ "prop-types",
75
+ ];
57
76
  if (masterRules.some((pkg) => id === pkg || id.startsWith(`${pkg}/`))) {
58
77
  return true;
59
78
  }
@@ -74,20 +93,21 @@ export default defineConfig(async ({ command, mode }) => {
74
93
  }
75
94
  warn(warning);
76
95
  },
77
- output: {
78
- dir: "dist",
79
- format: "es",
80
- entryFileNames: "[name].js",
81
- assetFileNames: (assetInfo) => {
82
- if (assetInfo.name?.endsWith(".css")) {
83
- return "builder.css";
84
- }
85
- if (assetInfo.name?.match(/\.(png|jpe?g|gif|webp)$/)) {
86
- return "assets/[name]-[hash][extname]";
87
- }
88
- return "assets/[name]-[hash][extname]";
96
+ output: [
97
+ {
98
+ dir: "dist",
99
+ format: "es",
100
+ entryFileNames: "[name].js",
101
+ assetFileNames: sharedAssetFileNames,
89
102
  },
90
- },
103
+ {
104
+ dir: "dist",
105
+ format: "cjs",
106
+ entryFileNames: "[name].cjs",
107
+ exports: "named",
108
+ assetFileNames: sharedAssetFileNames,
109
+ },
110
+ ],
91
111
  },
92
112
  sourcemap: true,
93
113
  copyPublicDir: false,