@cnc-ti/layout-basic 8.1.1 → 8.1.3

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/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@cnc-ti/layout-basic",
3
- "version": "8.1.1",
3
+ "version": "8.1.3",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {
9
- "build": "tsup src/index.ts --format esm,cjs --dts --external react --minify",
10
- "dev": "tsup src/index.ts --format esm,cjs --dts --external react --watch"
9
+ "build": "tsup src/index.ts --config tsup.config.ts",
10
+ "dev": "tsup src/index.ts --format esm,cjs --dts --external reacreact-dom --watch"
11
11
  },
12
12
  "keywords": [],
13
13
  "author": "",
package/tsconfig.json CHANGED
@@ -17,6 +17,6 @@
17
17
  "jsxImportSource": "react",
18
18
  "lib": ["dom", "ES2015"],
19
19
  "module": "ESNext",
20
- "target": "es6"
21
- },
20
+ "target": "ESNext"
21
+ }
22
22
  }
package/tsup.config.ts ADDED
@@ -0,0 +1,22 @@
1
+ import { defineConfig } from "tsup";
2
+
3
+ export default defineConfig({
4
+ entry: ["src/index.ts"], // Caminho para o seu arquivo de entrada
5
+ external: ["react", "react-dom"], // Marcar React como externo
6
+ format: ["esm", "cjs"], // Formatos de output (ESM e CommonJS)
7
+ dts: true, // Gerar arquivos de tipagem .d.ts
8
+ splitting: false, // Desativar divisão de código
9
+ sourcemap: true, // Gerar sourcemap
10
+ clean: true, // Limpar o diretório de build antes de reconstruir
11
+ minify: true,
12
+ banner: {
13
+ js: `import * as React from 'react';
14
+ import * as ReactDOM from 'react-dom';
15
+
16
+ const require = (moduleName) => {
17
+ if (moduleName === 'react') return React;
18
+ if (moduleName === 'react-dom') return ReactDOM;
19
+ throw new Error(\`Módulo desconhecido: \${moduleName}\`);
20
+ };`,
21
+ },
22
+ });