@rws-framework/client 2.18.3 → 2.18.4

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.
@@ -15,6 +15,7 @@ const { setComponentsChunks, scanComponents, generateRWSInfoFile, partedComponen
15
15
  const { getBuildConfig } = require('../../cfg/build_steps/webpack/_build_config');
16
16
  const { createWebpackConfig } = require('../../cfg/build_steps/webpack/_webpack_config');
17
17
  const { executeRWSStartActions, timingActions, devActions } = require('../../cfg/build_steps/webpack/_actions');
18
+ const { webpackDevServer } = require('../../cfg/build_steps/webpack/_dev_servers');
18
19
  const { RWS_WEBPACK_PLUGINS_BAG, addStartPlugins } = require('../../cfg/build_steps/webpack/_plugins');
19
20
 
20
21
 
@@ -14,7 +14,7 @@ function processImportPath(importPath, rwsWorkspaceDir, appRootDir, fileRootDir
14
14
  const workspaceDir = this.getRWSWorkspaceDir ? this.getRWSWorkspaceDir() : rwsWorkspaceDir;
15
15
  const appRoot = this.getRWSWorkspaceDir ? this.getRWSRootDir() : appRootDir;
16
16
 
17
- if (importPath.split('')[0] === '~') {
17
+ if (importPath.split('')[0] === '~') {
18
18
  return fillSCSSExt(replaceWithNodeModules(importPath, appRoot, null, true), noext);
19
19
  }
20
20
 
@@ -136,7 +136,8 @@ function detectImports(code) {
136
136
  }
137
137
 
138
138
  function replaceWithNodeModules(input, appRootDir, fileDir = null, absolute = false, token = '~') {
139
- _scss_fs = _scss_fs_builder(this);
139
+ _scss_fs = _scss_fs_builder(this);
140
+
140
141
  return input.replace(token, absolute ? `${path.join(appRootDir, 'node_modules')}/` : this.node_modules_dir(fileDir ? fileDir : appRootDir));
141
142
  }
142
143
 
@@ -0,0 +1,15 @@
1
+
2
+
3
+ function webpackDevServer(BuildConfigurator, rwsFrontendConfig, cfgExport){
4
+ const backendUrl = BuildConfigurator.get('backendUrl') || rwsFrontendConfig.backendUrl;
5
+ const apiPort = BuildConfigurator.get('apiPort') || rwsFrontendConfig.apiPort;
6
+
7
+ if (backendUrl && apiPort) {
8
+ // cfgExport.devServer = {
9
+ // hot: true, // Enable hot module replacement
10
+ // open: true, // Automatically open the browser
11
+ // }
12
+ }
13
+ }
14
+
15
+ module.exports = { webpackDevServer }
@@ -89,8 +89,6 @@ function getRWSLoaders(packageDir, executionDir, tsConfigData, appRootDir, entry
89
89
  },
90
90
  ];
91
91
 
92
- console.log(loaders[2].include);
93
-
94
92
  return loaders;
95
93
  }
96
94
 
@@ -54,7 +54,7 @@ async function createWebpackConfig({
54
54
  path: false
55
55
  }
56
56
  },
57
- devServer: hotReload ? getRWSHotReloadSetup(hotReloadPort, outputDir) : false,
57
+ devServer: hotReload ? getRWSHotReloadSetup(hotReloadPort, outputDir) : null,
58
58
  module: {
59
59
  rules: getRWSLoaders(_packageDir, executionDir, tsConfig, appRootDir, entrypoint),
60
60
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rws-framework/client",
3
3
  "private": false,
4
- "version": "2.18.3",
4
+ "version": "2.18.4",
5
5
  "main": "src/index.ts",
6
6
  "scripts": {
7
7
  "docs": "typedoc --tsconfig ./tsconfig.json"
@@ -44,8 +44,7 @@
44
44
  "upload": "^1.3.2",
45
45
  "url-router": "^13.0.0",
46
46
  "uuid": "^9.0.1",
47
- "v4": "^0.0.1",
48
- "scss-loading-animations": "^1.0.1"
47
+ "v4": "^0.0.1"
49
48
  },
50
49
  "devDependencies": {
51
50
  "@types/dragula": "^3.7.4",
@@ -152,11 +152,11 @@ async function start(this: RWSClientInstance, config: IRWSConfig = {}): Promise<
152
152
  await plugin.onClientStart();
153
153
  }
154
154
 
155
- // if(this.appConfig.get('hotReload')){
156
- // if (module.hot) {
157
- // module.hot.accept();
158
- // }
159
- // }
155
+ if(this.appConfig.get('hotReload')){
156
+ if (module.hot) {
157
+ module.hot.accept();
158
+ }
159
+ }
160
160
 
161
161
  return this;
162
162
  }