mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
[PS-182] Upgrade Angular to V14 (#2948)
This commit is contained in:
@@ -64,18 +64,25 @@ const moduleRules = [
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /(?:\.ngfactory\.js|\.ngstyle\.js|\.ts)$/,
|
||||
test: /\.[cm]?js$/,
|
||||
use: [
|
||||
{
|
||||
loader: "babel-loader",
|
||||
options: {
|
||||
configFile: false,
|
||||
plugins: ["@angular/compiler-cli/linker/babel"],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /\.[jt]sx?$/,
|
||||
loader: "@ngtools/webpack",
|
||||
},
|
||||
];
|
||||
|
||||
const plugins = [
|
||||
new CleanWebpackPlugin(),
|
||||
// ref: https://github.com/angular/angular/issues/20357
|
||||
new webpack.ContextReplacementPlugin(
|
||||
/\@angular(\\|\/)core(\\|\/)fesm5/,
|
||||
path.resolve(__dirname, "./src")
|
||||
),
|
||||
new HtmlWebpackPlugin({
|
||||
template: "./src/index.html",
|
||||
filename: "index.html",
|
||||
@@ -142,6 +149,9 @@ const plugins = [
|
||||
filename: "[name].[contenthash].css",
|
||||
chunkFilename: "[id].[contenthash].css",
|
||||
}),
|
||||
new webpack.ProvidePlugin({
|
||||
process: "process/browser.js",
|
||||
}),
|
||||
new webpack.EnvironmentPlugin({
|
||||
ENV: ENV,
|
||||
NODE_ENV: NODE_ENV === "production" ? "production" : "development",
|
||||
@@ -153,9 +163,6 @@ const plugins = [
|
||||
PAYPAL_CONFIG: envConfig["paypal"] ?? {},
|
||||
FLAGS: envConfig["flags"] ?? {},
|
||||
}),
|
||||
new webpack.ProvidePlugin({
|
||||
process: "process/browser",
|
||||
}),
|
||||
new AngularWebpackPlugin({
|
||||
tsConfigPath: "tsconfig.json",
|
||||
entryModule: "src/app/app.module#AppModule",
|
||||
|
||||
Reference in New Issue
Block a user