mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-13 04:50:29 +00:00
Make module types explicit and convert some to ESM (#15964)
This commit is contained in:
28
webpack.config.cjs
Normal file
28
webpack.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 webpack = require("./build-scripts/webpack.cjs");
|
||||
const env = require("./build-scripts/env.cjs");
|
||||
|
||||
// This file exists because we haven't migrated the stats script yet
|
||||
|
||||
const configs = [
|
||||
webpack.createAppConfig({
|
||||
isProdBuild: env.isProdBuild(),
|
||||
isStatsBuild: env.isStatsBuild(),
|
||||
isTestBuild: env.isTestBuild(),
|
||||
latestBuild: true,
|
||||
}),
|
||||
];
|
||||
|
||||
if (env.isProdBuild() && !env.isStatsBuild()) {
|
||||
configs.push(
|
||||
webpack.createAppConfig({
|
||||
isProdBuild: env.isProdBuild(),
|
||||
isStatsBuild: env.isStatsBuild(),
|
||||
isTestBuild: env.isTestBuild(),
|
||||
latestBuild: false,
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
module.exports = configs;
|
||||
Reference in New Issue
Block a user