@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.
- package/cfg/build_steps/webpack/_aliases.js +10 -0
- package/cfg/build_steps/webpack/_info.js +19 -0
- package/cfg/build_steps/webpack/_loaders.js +40 -0
- package/cfg/build_steps/webpack/_rws_externals.js +66 -0
- package/cfg/tsconfigSetup.js +30 -10
- package/foundation/index.js +1 -0
- package/foundation/rws-foundation.d.ts +8 -0
- package/foundation/rws-foundation.js +8 -0
- package/package.json +5 -4
- package/rws.webpack.config.js +139 -145
- package/service_worker/src/_service_worker.ts +1 -1
- package/src/client/config.ts +10 -3
- package/src/client.ts +2 -2
- package/src/components/_attrs/external-observable.ts +72 -0
- package/src/components/_component.ts +4 -5
- package/src/components/_container.ts +4 -4
- package/src/components/_decorator.ts +39 -9
- package/src/components/_decorators/RWSFillBuild.ts +0 -1
- package/src/components/_decorators/RWSInject.ts +3 -3
- package/src/components/_decorators/_di.ts +2 -2
- package/src/index.d.ts +1 -0
- package/src/index.ts +5 -5
- package/src/plugins/_plugin.ts +1 -1
- package/src/services/ConfigService.ts +3 -1
- package/src/services/_service.ts +10 -7
- package/src/types/RWSWindow.ts +2 -1
- package/tsconfig.json +5 -1
- package/webpack/loaders/rws_fast_scss_loader.js +20 -3
- package/webpack/loaders/rws_fast_ts_loader.js +3 -2
- package/webpack/rws_after_plugin.js +26 -23
- package/webpack/rws_scss_plugin.js +7 -8
- package/_rws_externals.js +0 -39
- package/src/components/_design_system.ts +0 -6
- package/webpack/loaders/rws_fast_html_loader.js +0 -8
- 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
|
-
};
|