This commit is contained in:
Luiz Silva 2025-10-23 22:07:00 -03:00
parent 889148eb42
commit 9dd2c4025b
2 changed files with 12 additions and 9 deletions

View file

@ -1,9 +1,8 @@
{ {
"name": "p-comuns", "name": "p-comuns",
"version": "0.254.0", "version": "0.255.0",
"description": "", "description": "",
"main": "dist/index.cjs", "main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
"sideEffects": false, "sideEffects": false,
"scripts": { "scripts": {

View file

@ -10,13 +10,17 @@ const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'))
// Agora vamos de Day.js “turbinado”: CJS + ESM + IIFE // Agora vamos de Day.js “turbinado”: CJS + ESM + IIFE
const nextPkg = { const nextPkg = {
...pkg, ...pkg,
main: 'dist/index.cjs', // Node / SSR (require)
module: 'dist/index.mjs', // Bundlers ESM
types: 'dist/index.d.ts', // Tipos "main": "dist/index.cjs",
browser: 'dist/index.global.js', // Browser sem bundler (<script>) "types": "dist/index.d.ts",
unpkg: 'dist/index.global.js', "browser": "dist/index.global.js",
jsdelivr: 'dist/index.global.js', "unpkg": "dist/index.global.js",
// Remove campos que atrapalham o resolver: "jsdelivr": "dist/index.global.js",
"sideEffects": false,
module: undefined,
type: undefined as unknown as string, type: undefined as unknown as string,
exports: undefined as unknown as Record<string, unknown>, exports: undefined as unknown as Record<string, unknown>,
} }