@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 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 isWebApp = params.type != `server`, { mode = `production`, obfuscateON = false, minimiseON = true, srcDir = `src`, productionDir = `public_html`, port = 3210, maxFileSizeMB = 2, resolveOptions = {}, licenseText = ``, } = params, { filesList = [], } = isWebApp ? {} : params, { entryPoints = {}, customWebRules = [], configWebPlugins = [], cssMinimise = [] } = isWebApp ? (0, web_1.webConfig)(params) : {}, fileSize = maxFileSizeMB * 1024 ** 2, envKeys = {};
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
- externals: [(0, webpack_node_externals_1.default)()], // Externalize all node_modules
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
@@ -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 */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "license": "MIT",
3
3
  "name": "@degreesign/webapp",
4
- "version": "1.6.8",
4
+ "version": "1.6.9",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",