vatts 1.1.3 → 1.1.4-alpha.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.
Files changed (2) hide show
  1. package/dist/builder.js +6 -3
  2. package/package.json +1 -1
package/dist/builder.js CHANGED
@@ -186,8 +186,9 @@ const customPostCssPlugin = (isProduction) => {
186
186
  });
187
187
  // Lógica unificada: Usa arquivo externo tanto em Dev quanto Prod.
188
188
  // Isso libera a memória que seria usada para stringificar o CSS dentro do JS.
189
+ // FIX: O Rollup pode retornar um objeto URL ao invés de string. String() força a conversão.
189
190
  return `
190
- const cssUrl = import.meta.ROLLUP_FILE_URL_${referenceId};
191
+ const cssUrl = String(import.meta.ROLLUP_FILE_URL_${referenceId});
191
192
  if (typeof document !== 'undefined') {
192
193
  const link = document.createElement('link');
193
194
  link.rel = 'stylesheet';
@@ -256,8 +257,9 @@ const smartAssetPlugin = (isProduction) => {
256
257
  });
257
258
  const content = buffer.toString('utf8');
258
259
  buffer = null; // GC Hint
260
+ // FIX: O Rollup pode retornar um objeto URL. String() resolve o erro de startsWith.
259
261
  return `
260
- export default import.meta.ROLLUP_FILE_URL_${referenceId};
262
+ export default String(import.meta.ROLLUP_FILE_URL_${referenceId});
261
263
  export const svgContent = ${JSON.stringify(content)};
262
264
  `;
263
265
  }
@@ -278,7 +280,8 @@ const smartAssetPlugin = (isProduction) => {
278
280
  source: buffer
279
281
  });
280
282
  buffer = null; // Libera memória
281
- return `export default import.meta.ROLLUP_FILE_URL_${referenceId};`;
283
+ // FIX: O Rollup pode retornar um objeto URL. String() resolve o erro de startsWith.
284
+ return `export default String(import.meta.ROLLUP_FILE_URL_${referenceId});`;
282
285
  }
283
286
  }
284
287
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vatts",
3
- "version": "1.1.3",
3
+ "version": "1.1.4-alpha.1",
4
4
  "description": "Vatts.js is a high-level framework for building web applications with ease and speed. It provides a robust set of tools and features to streamline development and enhance productivity.",
5
5
  "types": "dist/index.d.ts",
6
6
  "author": "itsmuzin",