@studyportals/webpack-helper 7.0.1-1 → 7.0.1-3
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/package.json
CHANGED
|
@@ -16,6 +16,7 @@ const mode_1 = require("../enums/mode");
|
|
|
16
16
|
const production_config_1 = require("../defaults/production.config");
|
|
17
17
|
const development_config_1 = require("../defaults/development.config");
|
|
18
18
|
const chunks_retry_plugin_factory_1 = __importDefault(require("../factories/chunks-retry-plugin-factory"));
|
|
19
|
+
const vue_typescript_swc_preset_1 = require("../presets/vue-typescript-swc.preset");
|
|
19
20
|
const ManifestGenerator = require("@studyportals/bob-manifest-generator").ManifestGenerator;
|
|
20
21
|
const DllReferencePlugin = require("@studyportals/bob-manifest-generator").DllReferencePlugin;
|
|
21
22
|
const { merge } = require('webpack-merge');
|
|
@@ -70,7 +71,7 @@ class Configuration {
|
|
|
70
71
|
this.injectPreset(new vue_typescript_preset_1.VueTypeScriptPreset(mode, this.chunksRetryConfig, this.customElementTags));
|
|
71
72
|
break;
|
|
72
73
|
case preset_1.Preset.VUE_TYPESCRIPT_SWC:
|
|
73
|
-
this.injectPreset(new
|
|
74
|
+
this.injectPreset(new vue_typescript_swc_preset_1.VueTypescriptSwcPreset(mode, this.chunksRetryConfig, this.customElementTags));
|
|
74
75
|
case preset_1.Preset.TYPESCRIPT:
|
|
75
76
|
this.injectPreset(new typescript_preset_1.TypeScriptPreset(mode, this.chunksRetryConfig));
|
|
76
77
|
break;
|
|
@@ -11,6 +11,7 @@ class VueTypescriptSwcPreset {
|
|
|
11
11
|
this.mode = mode;
|
|
12
12
|
this.retryChunksConfig = retryChunksConfig;
|
|
13
13
|
this.customElementTags = customElementTags;
|
|
14
|
+
console.log(`[VueTypescriptSwcPreset] Constructor called for mode: ${mode}`);
|
|
14
15
|
}
|
|
15
16
|
getPlugins(filename) {
|
|
16
17
|
return [
|
|
@@ -55,25 +56,32 @@ class VueTypescriptSwcPreset {
|
|
|
55
56
|
]
|
|
56
57
|
},
|
|
57
58
|
hotReload: false,
|
|
58
|
-
compilerOptions: {
|
|
59
|
-
isCustomElement: (tag) => this.customElementTags.includes(tag)
|
|
60
|
-
}
|
|
61
59
|
}
|
|
62
60
|
},
|
|
63
61
|
{
|
|
64
|
-
test: /\.
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
62
|
+
test: /\.(ts|js)x?$/,
|
|
63
|
+
exclude: /node_modules/,
|
|
64
|
+
use: {
|
|
65
|
+
loader: 'swc-loader',
|
|
66
|
+
options: {
|
|
67
|
+
jsc: {
|
|
68
|
+
keepClassNames: true,
|
|
69
|
+
parser: {
|
|
70
|
+
syntax: 'typescript',
|
|
71
|
+
tsx: true,
|
|
72
|
+
decorators: true,
|
|
73
|
+
},
|
|
74
|
+
transform: {
|
|
75
|
+
legacyDecorator: true,
|
|
76
|
+
decoratorMetadata: true
|
|
77
|
+
},
|
|
78
|
+
target: 'es6'
|
|
79
|
+
},
|
|
80
|
+
module: {
|
|
81
|
+
type: 'es6'
|
|
73
82
|
}
|
|
74
83
|
}
|
|
75
|
-
|
|
76
|
-
exclude: /node_modules\/(?!@studyportals\/).*/
|
|
84
|
+
}
|
|
77
85
|
},
|
|
78
86
|
{
|
|
79
87
|
test: /\.js$/,
|