@rws-framework/client 2.8.5 → 2.9.0

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.
Files changed (35) hide show
  1. package/cfg/build_steps/webpack/_aliases.js +10 -0
  2. package/cfg/build_steps/webpack/_info.js +19 -0
  3. package/cfg/build_steps/webpack/_loaders.js +40 -0
  4. package/cfg/build_steps/webpack/_rws_externals.js +66 -0
  5. package/cfg/tsconfigSetup.js +30 -10
  6. package/foundation/index.js +1 -0
  7. package/foundation/rws-foundation.d.ts +8 -0
  8. package/foundation/rws-foundation.js +8 -0
  9. package/package.json +5 -4
  10. package/rws.webpack.config.js +139 -145
  11. package/service_worker/src/_service_worker.ts +1 -1
  12. package/src/client/config.ts +10 -3
  13. package/src/client.ts +2 -2
  14. package/src/components/_attrs/external-observable.ts +72 -0
  15. package/src/components/_component.ts +4 -5
  16. package/src/components/_container.ts +4 -4
  17. package/src/components/_decorator.ts +39 -9
  18. package/src/components/_decorators/RWSFillBuild.ts +0 -1
  19. package/src/components/_decorators/RWSInject.ts +3 -3
  20. package/src/components/_decorators/_di.ts +2 -2
  21. package/src/index.d.ts +1 -0
  22. package/src/index.ts +5 -5
  23. package/src/plugins/_plugin.ts +1 -1
  24. package/src/services/ConfigService.ts +3 -1
  25. package/src/services/_service.ts +10 -7
  26. package/src/types/RWSWindow.ts +2 -1
  27. package/tsconfig.json +5 -1
  28. package/webpack/loaders/rws_fast_scss_loader.js +20 -3
  29. package/webpack/loaders/rws_fast_ts_loader.js +3 -2
  30. package/webpack/rws_after_plugin.js +26 -23
  31. package/webpack/rws_scss_plugin.js +7 -8
  32. package/_rws_externals.js +0 -39
  33. package/src/components/_design_system.ts +0 -6
  34. package/webpack/loaders/rws_fast_html_loader.js +0 -8
  35. package/webpack/loaders/rws_uncomments_loader.js +0 -35
@@ -1,35 +0,0 @@
1
-
2
-
3
- const path = require('path');
4
- const Terser = require('terser');
5
-
6
- async function removeCommentsFromFile(code, inputSourceMap) {
7
- const callback = this.async();
8
- const sourceMap = this.sourceMap;
9
- // Configure Terser to remove comments
10
- try {
11
- const minifyOptions = {
12
- format: {
13
- comments: false // Remove all comments
14
- },
15
- sourceMap: sourceMap
16
- ? {
17
- content: inputSourceMap || false,
18
- url: 'out.js.map'
19
- }
20
- : false
21
- };
22
-
23
- // Minify source code
24
- const result = await Terser.minify(code, minifyOptions);
25
-
26
- // Pass along the source map if enabled
27
- callback(null, result.code, result.map || inputSourceMap);
28
- } catch (err) {
29
- callback(err);
30
- }
31
- }
32
-
33
- module.exports = async function (source, inputSourceMap) {
34
- return await removeCommentsFromFile.bind(this)(source, inputSourceMap);
35
- };