@degreesign/webapp 1.6.8 → 1.6.9
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/src/main.js +4 -2
- package/dist/src/types.d.ts +2 -0
- package/package.json +1 -1
package/dist/src/main.js
CHANGED
|
@@ -15,7 +15,7 @@ const web_1 = require("./web");
|
|
|
15
15
|
const obfuscate_1 = require("./obfuscate");
|
|
16
16
|
dotenv_1.default.config();
|
|
17
17
|
const build = (params) => {
|
|
18
|
-
const
|
|
18
|
+
const { mode = `production`, obfuscateON = false, minimiseON = true, srcDir = `src`, productionDir = `public_html`, port = 3210, maxFileSizeMB = 2, resolveOptions = {}, licenseText = ``, includeServerModules, type: setupType } = params, isWebApp = setupType != `server`, { filesList = [], } = isWebApp ? {} : params, { entryPoints = {}, customWebRules = [], configWebPlugins = [], cssMinimise = [] } = isWebApp ? (0, web_1.webConfig)(params) : {}, fileSize = maxFileSizeMB * 1024 ** 2, envKeys = {};
|
|
19
19
|
// Environment keys
|
|
20
20
|
for (const key in process.env)
|
|
21
21
|
envKeys[`process.env.${key}`] = JSON.stringify(process.env[key]);
|
|
@@ -50,7 +50,9 @@ const build = (params) => {
|
|
|
50
50
|
__dirname: false, // Prevent Webpack from mocking __dirname
|
|
51
51
|
__filename: false, // Prevent Webpack from mocking __filename
|
|
52
52
|
},
|
|
53
|
-
|
|
53
|
+
...includeServerModules ? {} : {
|
|
54
|
+
externals: [(0, webpack_node_externals_1.default)()], // Externalize all node_modules
|
|
55
|
+
},
|
|
54
56
|
},
|
|
55
57
|
resolve: {
|
|
56
58
|
extensions: [`.tsx`, `.ts`, `.js`, `.json`], // Resolve files
|
package/dist/src/types.d.ts
CHANGED
|
@@ -68,6 +68,8 @@ export interface ConfigBase {
|
|
|
68
68
|
licenseText?: string;
|
|
69
69
|
/** Show Packages Analyser Window */
|
|
70
70
|
openAnalyzer?: boolean;
|
|
71
|
+
/** Node module included for server */
|
|
72
|
+
includeServerModules?: boolean;
|
|
71
73
|
}
|
|
72
74
|
export interface ConfigWebApp extends ConfigBase {
|
|
73
75
|
/** Name of the website */
|