nyte 1.3.1-alpha.2 → 1.3.1-alpha.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/dist/builder.js +9 -10
- package/package.json +1 -1
package/dist/builder.js
CHANGED
|
@@ -293,17 +293,22 @@ function createRollupConfig(entryPoint, outdir, isProduction) {
|
|
|
293
293
|
cache: true,
|
|
294
294
|
perf: false,
|
|
295
295
|
plugins: [
|
|
296
|
+
// CRÍTICO: 'replace' deve vir PRIMEIRO para injetar NODE_ENV antes que
|
|
297
|
+
// libs como React decidam qual bundle importar.
|
|
298
|
+
replace({
|
|
299
|
+
preventAssignment: true,
|
|
300
|
+
values: {
|
|
301
|
+
'process.env.NODE_ENV': JSON.stringify(isProduction ? 'production' : 'development')
|
|
302
|
+
}
|
|
303
|
+
}),
|
|
296
304
|
nodeResolve({
|
|
297
305
|
extensions: ['.mjs', '.js', '.json', '.node', '.jsx', '.tsx', '.ts'],
|
|
298
306
|
preferBuiltins: true,
|
|
299
|
-
// CORREÇÃO CRÍTICA: Definir browser: true é essencial para que o React
|
|
300
|
-
// e outras libs de frontend resolvam o entrypoint correto.
|
|
301
307
|
browser: true,
|
|
302
|
-
dedupe: ['react', 'react-dom']
|
|
308
|
+
dedupe: ['react', 'react-dom']
|
|
303
309
|
}),
|
|
304
310
|
commonjs({
|
|
305
311
|
sourceMap: !isProduction,
|
|
306
|
-
// CORREÇÃO: Ajuda o Rollup a entender as exports do React (CJS -> ESM)
|
|
307
312
|
requireReturnsDefault: 'auto'
|
|
308
313
|
}),
|
|
309
314
|
markdownPlugin(),
|
|
@@ -311,12 +316,6 @@ function createRollupConfig(entryPoint, outdir, isProduction) {
|
|
|
311
316
|
customPostCssPlugin(isProduction),
|
|
312
317
|
// Substitui forceBase64Plugin pelo Smart
|
|
313
318
|
smartAssetPlugin(isProduction),
|
|
314
|
-
replace({
|
|
315
|
-
preventAssignment: true,
|
|
316
|
-
values: {
|
|
317
|
-
'process.env.NODE_ENV': JSON.stringify(isProduction ? 'production' : 'development')
|
|
318
|
-
}
|
|
319
|
-
}),
|
|
320
319
|
esbuild({
|
|
321
320
|
include: /\.[jt]sx?$/,
|
|
322
321
|
exclude: /node_modules/,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nyte",
|
|
3
|
-
"version": "1.3.1-alpha.
|
|
3
|
+
"version": "1.3.1-alpha.3",
|
|
4
4
|
"description": "Nyte.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",
|