1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-20 10:48:44 +00:00

Use SWC for typescript, update to Lit 3, migrate decorators (#25150)

Co-authored-by: Wendelin <w@pe8.at>
This commit is contained in:
Bram Kragten
2025-04-24 14:10:35 +02:00
committed by GitHub
parent c40bf8f3cd
commit e156dd36f4
241 changed files with 1676 additions and 1388 deletions

View File

@@ -65,19 +65,28 @@ const createRspackConfig = ({
rules: [
{
test: /\.m?js$|\.ts$/,
use: (info) => ({
loader: "babel-loader",
options: {
...bundle.babelOptions({
latestBuild,
isProdBuild,
isTestBuild,
sw: info.issuerLayer === "sw",
}),
cacheDirectory: !isProdBuild,
cacheCompression: false,
exclude: /node_modules[\\/]core-js/,
use: (info) => [
{
loader: "babel-loader",
options: {
...bundle.babelOptions({
latestBuild,
isProdBuild,
isTestBuild,
sw: info.issuerLayer === "sw",
}),
cacheDirectory: !isProdBuild,
cacheCompression: false,
},
},
}),
{
loader: "builtin:swc-loader",
options: bundle.swcOptions({
latestBuild,
}),
},
],
resolve: {
fullySpecified: false,
},
@@ -136,7 +145,8 @@ const createRspackConfig = ({
// calling define.amd will call require("!!webpack amd options")
resource.startsWith("!!webpack") ||
// loaded by webpack dev server but doesn't exist.
resource === "webpack/hot"
resource === "webpack/hot" ||
resource.startsWith("@swc/helpers")
) {
return false;
}