swico 0.8.5-beta5 → 0.8.5-beta6

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-beta5",
3
+ "version": "0.8.5-beta6",
4
4
  "description": "Simple, efficient, and practical front-end framework",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -64,7 +64,7 @@
64
64
  "eslint-plugin-react-hooks": "4.3.0",
65
65
  "eslint-plugin-vue": "9.19.2",
66
66
  "eslint-webpack-plugin": "4.0.0",
67
- "fork-ts-checker-webpack-plugin": "9.0.2",
67
+ "fork-ts-checker-webpack-plugin": "8.0.0",
68
68
  "html-loader": "5.0.0",
69
69
  "html-webpack-plugin": "5.3.2",
70
70
  "husky": "9.0.10",
@@ -25,8 +25,15 @@ export default function ({ projectPath, entryPath, env, customConfig }: GlobalDa
25
25
  use: {
26
26
  loader: string;
27
27
  options: {
28
- appendTsSuffixTo: RegExp[];
29
- configFile: string;
28
+ jsc: {
29
+ parser: {
30
+ syntax: string;
31
+ tsx: boolean;
32
+ decorators: boolean;
33
+ dynamicImport: boolean;
34
+ };
35
+ target: string;
36
+ };
30
37
  };
31
38
  }[];
32
39
  loader?: undefined;
@@ -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;
@@ -115,14 +117,21 @@ function default_1(_a) {
115
117
  exclude: /node_modules/
116
118
  },
117
119
  {
118
- test: /\.ts$/,
120
+ test: /\.(ts|js)$/,
119
121
  exclude: /node_modules/,
120
122
  use: [
121
123
  {
122
- loader: 'ts-loader',
124
+ loader: 'swc-loader',
123
125
  options: {
124
- appendTsSuffixTo: [/\.vue$/],
125
- configFile: path_1.default.resolve(process.cwd(), 'tsconfig.json')
126
+ jsc: {
127
+ parser: {
128
+ syntax: 'typescript',
129
+ tsx: false,
130
+ decorators: true,
131
+ dynamicImport: true
132
+ },
133
+ target: 'es2015'
134
+ }
126
135
  }
127
136
  }
128
137
  ]
@@ -268,6 +277,20 @@ function default_1(_a) {
268
277
  },
269
278
  hash: true
270
279
  }),
280
+ new fork_ts_checker_webpack_plugin_1.default({
281
+ logger: {
282
+ log: function () { },
283
+ error: function (message) {
284
+ tools_1.toast.error(message, { title: 'TypeScript errors' });
285
+ }
286
+ },
287
+ typescript: {
288
+ diagnosticOptions: {
289
+ semantic: true,
290
+ syntactic: true
291
+ }
292
+ }
293
+ }),
271
294
  new mini_css_extract_plugin_1.default({
272
295
  filename: env === 'dev' ? 'css/[name].css' : 'css/[name].[contenthash].css',
273
296
  ignoreOrder: true