swico 0.8.5-beta11 → 0.8.5-beta14
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "swico",
|
|
3
|
-
"version": "0.8.5-
|
|
3
|
+
"version": "0.8.5-beta14",
|
|
4
4
|
"description": "Simple, efficient, and practical front-end framework",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"esbuild-loader": "4.0.3",
|
|
70
70
|
"eslint": "8.48.0",
|
|
71
71
|
"eslint-webpack-plugin": "4.0.0",
|
|
72
|
-
"fork-ts-checker-webpack-plugin": "
|
|
72
|
+
"fork-ts-checker-webpack-plugin": "8.0.0",
|
|
73
73
|
"html-loader": "5.0.0",
|
|
74
74
|
"html-webpack-plugin": "5.3.2",
|
|
75
75
|
"husky": "9.0.10",
|
|
@@ -42,9 +42,17 @@ export default function ({ projectPath, entryPath, env, customConfig }: GlobalDa
|
|
|
42
42
|
use: {
|
|
43
43
|
loader: string;
|
|
44
44
|
options: {
|
|
45
|
-
|
|
45
|
+
jsc: {
|
|
46
|
+
parser: {
|
|
47
|
+
syntax: string;
|
|
48
|
+
tsx: boolean;
|
|
49
|
+
decorators: boolean;
|
|
50
|
+
dynamicImport: boolean;
|
|
51
|
+
};
|
|
52
|
+
target: string;
|
|
53
|
+
};
|
|
46
54
|
};
|
|
47
|
-
};
|
|
55
|
+
}[];
|
|
48
56
|
loader?: undefined;
|
|
49
57
|
oneOf?: undefined;
|
|
50
58
|
} | {
|
|
@@ -63,8 +63,10 @@ var path_1 = __importDefault(require("path"));
|
|
|
63
63
|
var mini_css_extract_plugin_1 = __importDefault(require("mini-css-extract-plugin"));
|
|
64
64
|
var config_1 = require("../utils/config");
|
|
65
65
|
var html_webpack_plugin_1 = __importDefault(require("html-webpack-plugin"));
|
|
66
|
+
var fork_ts_checker_webpack_plugin_1 = __importDefault(require("fork-ts-checker-webpack-plugin"));
|
|
66
67
|
var webpack_1 = __importDefault(require("webpack"));
|
|
67
68
|
var vue_loader_1 = require("vue-loader");
|
|
69
|
+
var tools_1 = require("../utils/tools");
|
|
68
70
|
function default_1(_a) {
|
|
69
71
|
var _b, _c, _d;
|
|
70
72
|
var projectPath = _a.projectPath, entryPath = _a.entryPath, env = _a.env, customConfig = _a.customConfig;
|
|
@@ -133,14 +135,24 @@ function default_1(_a) {
|
|
|
133
135
|
]
|
|
134
136
|
},
|
|
135
137
|
{
|
|
136
|
-
test: /\.ts$/,
|
|
138
|
+
test: /\.(ts|js)$/,
|
|
137
139
|
exclude: /node_modules/,
|
|
138
|
-
use:
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
use: [
|
|
141
|
+
{
|
|
142
|
+
loader: 'swc-loader',
|
|
143
|
+
options: {
|
|
144
|
+
jsc: {
|
|
145
|
+
parser: {
|
|
146
|
+
syntax: 'typescript',
|
|
147
|
+
tsx: false,
|
|
148
|
+
decorators: true,
|
|
149
|
+
dynamicImport: true
|
|
150
|
+
},
|
|
151
|
+
target: 'es2015'
|
|
152
|
+
}
|
|
153
|
+
}
|
|
142
154
|
}
|
|
143
|
-
|
|
155
|
+
]
|
|
144
156
|
},
|
|
145
157
|
{
|
|
146
158
|
oneOf: [
|
|
@@ -283,6 +295,26 @@ function default_1(_a) {
|
|
|
283
295
|
},
|
|
284
296
|
hash: true
|
|
285
297
|
}),
|
|
298
|
+
new fork_ts_checker_webpack_plugin_1.default({
|
|
299
|
+
logger: {
|
|
300
|
+
log: function () { },
|
|
301
|
+
error: function (message) {
|
|
302
|
+
tools_1.toast.error(message, { title: 'TypeScript errors' });
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
typescript: {
|
|
306
|
+
extensions: {
|
|
307
|
+
vue: {
|
|
308
|
+
enabled: true,
|
|
309
|
+
compiler: '@vue/compiler-sfc'
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
diagnosticOptions: {
|
|
313
|
+
semantic: true,
|
|
314
|
+
syntactic: true
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}),
|
|
286
318
|
new mini_css_extract_plugin_1.default({
|
|
287
319
|
filename: env === 'dev' ? 'css/[name].css' : 'css/[name].[contenthash].css',
|
|
288
320
|
ignoreOrder: true
|