hightjs 0.2.48 → 0.2.50

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 CHANGED
@@ -2,6 +2,7 @@
2
2
  const esbuild = require('esbuild');
3
3
  const path = require('path');
4
4
  const Console = require("./api/console");
5
+ const fs = require('fs');
5
6
  // Lista de módulos nativos do Node.js para marcar como externos (apenas os built-ins do Node)
6
7
  const nodeBuiltIns = [
7
8
  'assert', 'buffer', 'child_process', 'cluster', 'crypto', 'dgram', 'dns',
@@ -166,6 +167,8 @@ const reactResolvePlugin = {
166
167
  * @returns {Promise<void>}
167
168
  */
168
169
  async function buildWithChunks(entryPoint, outdir, isProduction = false) {
170
+ // limpar diretorio
171
+ fs.rmSync(outdir, { recursive: true, force: true });
169
172
  if (!isProduction) {
170
173
  console.log(`Iniciando o build com chunks de \"${entryPoint}\"...`);
171
174
  }
package/dist/renderer.js CHANGED
@@ -88,7 +88,7 @@ function getJavaScriptFiles(req) {
88
88
  return a.localeCompare(b);
89
89
  });
90
90
  // @ts-ignore
91
- if (jsFiles.length > 1) {
91
+ if (jsFiles.length >= 1) {
92
92
  // Modo chunks sem manifesto
93
93
  return jsFiles
94
94
  .map(file => `<script src="/hweb-dist/${file}"></script>`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hightjs",
3
- "version": "0.2.48",
3
+ "version": "0.2.50",
4
4
  "description": "HightJS 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
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/builder.js CHANGED
@@ -1,7 +1,7 @@
1
1
  const esbuild = require('esbuild');
2
2
  const path = require('path');
3
3
  const Console = require("./api/console")
4
-
4
+ const fs = require('fs');
5
5
  // Lista de módulos nativos do Node.js para marcar como externos (apenas os built-ins do Node)
6
6
  const nodeBuiltIns = [
7
7
  'assert', 'buffer', 'child_process', 'cluster', 'crypto', 'dgram', 'dns',
@@ -181,6 +181,9 @@ const reactResolvePlugin = {
181
181
  * @returns {Promise<void>}
182
182
  */
183
183
  async function buildWithChunks(entryPoint, outdir, isProduction = false) {
184
+ // limpar diretorio
185
+ fs.rmSync(outdir, { recursive: true, force: true });
186
+
184
187
  if (!isProduction) {
185
188
  console.log(`Iniciando o build com chunks de \"${entryPoint}\"...`);
186
189
  }
package/src/renderer.tsx CHANGED
@@ -106,7 +106,7 @@ function getJavaScriptFiles(req: GenericRequest): string {
106
106
  });
107
107
 
108
108
  // @ts-ignore
109
- if (jsFiles.length > 1) {
109
+ if (jsFiles.length >= 1) {
110
110
  // Modo chunks sem manifesto
111
111
  return jsFiles
112
112
  .map(file => `<script src="/hweb-dist/${file}"></script>`)