diff --git a/.swcrc b/.swcrc new file mode 100644 index 00000000..4502b6a6 --- /dev/null +++ b/.swcrc @@ -0,0 +1,31 @@ +{ + "$schema": "https://swc.rs/schema.json", + "jsc": { + "externalHelpers": false, + "keepClassNames": false, + "loose": false, + "minify": { + "compress": true, + "mangle": true + }, + "parser": { + "decorators": false, + "decoratorsBeforeExport": false, + "dynamicImport": false, + "exportDefaultFrom": false, + "exportNamespaceFrom": false, + "functionBind": false, + "importMeta": false, + "jsx": false, + "privateMethod": false, + "syntax": "typescript", + "topLevelAwait": false, + "tsx": false + }, + "preserveAllComments": false, + "target": "es2022", + "transform": null + }, + "minify": true, + "sourceMaps": true +} diff --git a/package.json b/package.json index 5a668fd5..17b57f07 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,9 @@ "@prettier/plugin-php": "^0.22.2", "@prettier/plugin-xml": "^3.4.1", "@zackad/prettier-plugin-twig-melody": "^0.6.0", + "@swc/cli": "^0.4.0", + "@swc/core": "^1.7.9", + "browserslist": "^4.23.3", "prettier": "^3.3.3", "prettier-plugin-pkg": "^0.18.1", "prettier-plugin-sh": "^0.14.0", @@ -26,6 +29,11 @@ "stylelint-config-standard-scss": "^13.1.0", "stylelint-declaration-block-no-ignored-properties": "^2.8.0", "stylelint-plugin-logical-css": "^1.2.1", + "typescript": "^5.5.4", "vite": "^5.4.0" - } + }, + "browserslist": [ + "last 5 major version", + "not dead" + ] } diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..ffce8ccf --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,8 @@ +{ + "compilerOptions": { + "allowJs": true, + "checkJs": true, + "isolatedModules": true, + "strict": true + } +}