mirror of
https://github.com/home-assistant/frontend.git
synced 2025-12-27 06:06:30 +00:00
Rspack (#22807)
* Add rspack * Remove TransformAsyncModulesPlugin from rspack * Migrate all webpack usage to rspack * Migrate tests to vitest * Fix test suites * Remove chai dependency * Fix compute_state_display tests * Fix resolveTimeZone * Reduces test pipeline * Revert test ci * optimize chunk filtering * Migrate landing-page to rspack * Update rspack dependencies * Add rsdoctor * Fix prod build bundle size * Use rsdoctor for demo stats * Remove unused webpack configs * Update build-scripts/rspack.cjs Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com> * Fix eslint * Update rspack * Remove unused code --------- Co-authored-by: Petar Petrov <MindFreeze@users.noreply.github.com>
This commit is contained in:
28
rspack.config.cjs
Normal file
28
rspack.config.cjs
Normal file
@@ -0,0 +1,28 @@
|
||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
// Needs to remain CommonJS until eslint-import-resolver-webpack supports ES modules
|
||||
const rspack = require("./build-scripts/rspack.cjs");
|
||||
const env = require("./build-scripts/env.cjs");
|
||||
|
||||
// This file exists because we haven't migrated the stats script yet
|
||||
|
||||
const configs = [
|
||||
rspack.createAppConfig({
|
||||
isProdBuild: env.isProdBuild(),
|
||||
isStatsBuild: env.isStatsBuild(),
|
||||
isTestBuild: env.isTestBuild(),
|
||||
latestBuild: true,
|
||||
}),
|
||||
];
|
||||
|
||||
if (env.isProdBuild() && !env.isStatsBuild()) {
|
||||
configs.push(
|
||||
rspack.createAppConfig({
|
||||
isProdBuild: env.isProdBuild(),
|
||||
isStatsBuild: env.isStatsBuild(),
|
||||
isTestBuild: env.isTestBuild(),
|
||||
latestBuild: false,
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
module.exports = configs;
|
||||
Reference in New Issue
Block a user