mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-22 11:45:59 +01:00
Bump Angular to v12 (#2215)
This commit is contained in:
parent
e835a53b80
commit
559be594d6
2
jslib
2
jslib
@ -1 +1 @@
|
||||
Subproject commit a6b95b15e36737ccf2e7664ed3c881bc19366b84
|
||||
Subproject commit 6a179ab2dfacbc1dbd5dd4c185bc57cbac168994
|
@ -7,7 +7,7 @@ module.exports = function(config) {
|
||||
|
||||
// frameworks to use
|
||||
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
|
||||
frameworks: ['jasmine'],
|
||||
frameworks: ['jasmine', 'webpack'],
|
||||
|
||||
// list of files / patterns to load in the browser
|
||||
files: [
|
||||
|
8735
package-lock.json
generated
8735
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
46
package.json
46
package.json
@ -27,27 +27,27 @@
|
||||
"test:watch": "karma start"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/compiler-cli": "^11.2.11",
|
||||
"@ngtools/webpack": "^11.2.10",
|
||||
"@angular/compiler-cli": "^12.2.13",
|
||||
"@ngtools/webpack": "^12.2.13",
|
||||
"@types/chrome": "^0.0.139",
|
||||
"@types/firefox-webext-browser": "^82.0.0",
|
||||
"@types/jasmine": "^3.7.6",
|
||||
"@types/mousetrap": "^1.6.8",
|
||||
"@types/node": "^14.17.2",
|
||||
"clean-webpack-plugin": "^3.0.0",
|
||||
"copy-webpack-plugin": "^6.4.0",
|
||||
"buffer": "^6.0.3",
|
||||
"clean-webpack-plugin": "^4.0.0",
|
||||
"copy-webpack-plugin": "^10.0.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"css-loader": "^5.2.4",
|
||||
"css-loader": "^6.5.1",
|
||||
"del": "^6.0.0",
|
||||
"file-loader": "^6.2.0",
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-filter": "^7.0.0",
|
||||
"gulp-if": "^3.0.0",
|
||||
"gulp-json-editor": "^2.5.5",
|
||||
"gulp-replace": "^1.1.0",
|
||||
"gulp-zip": "^5.1.0",
|
||||
"html-loader": "^1.3.2",
|
||||
"html-webpack-plugin": "^4.5.1",
|
||||
"html-loader": "^3.0.1",
|
||||
"html-webpack-plugin": "^5.5.0",
|
||||
"jasmine-core": "^3.7.1",
|
||||
"jasmine-spec-reporter": "^7.0.0",
|
||||
"karma": "^6.3.2",
|
||||
@ -55,27 +55,39 @@
|
||||
"karma-cli": "^2.0.0",
|
||||
"karma-jasmine": "^4.0.0",
|
||||
"karma-jasmine-html-reporter": "^1.5.0",
|
||||
"karma-webpack": "^4.0.2",
|
||||
"mini-css-extract-plugin": "^1.5.0",
|
||||
"karma-webpack": "^5.0.0",
|
||||
"mini-css-extract-plugin": "^2.4.5",
|
||||
"process": "^0.11.10",
|
||||
"sass": "^1.34.1",
|
||||
"sass-loader": "^10.1.1",
|
||||
"style-loader": "^2.0.0",
|
||||
"sass-loader": "^12.4.0",
|
||||
"style-loader": "^3.3.1",
|
||||
"tapable": "^1.1.3",
|
||||
"ts-loader": "^8.1.0",
|
||||
"ts-loader": "^9.2.5",
|
||||
"tslint": "^6.1.0",
|
||||
"tslint-loader": "^3.5.4",
|
||||
"typescript": "4.1.5",
|
||||
"webpack": "^4.46.0",
|
||||
"webpack-cli": "^4.6.0"
|
||||
"typescript": "4.3.5",
|
||||
"url": "^0.11.0",
|
||||
"util": "^0.12.4",
|
||||
"webpack": "^5.64.4",
|
||||
"webpack-cli": "^4.9.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@angular/animations": "^12.2.13",
|
||||
"@angular/cdk": "^12.2.13",
|
||||
"@angular/common": "^12.2.13",
|
||||
"@angular/compiler": "^12.2.13",
|
||||
"@angular/core": "^12.2.13",
|
||||
"@angular/forms": "^12.2.13",
|
||||
"@angular/platform-browser": "^12.2.13",
|
||||
"@angular/platform-browser-dynamic": "^12.2.13",
|
||||
"@angular/router": "^12.2.13",
|
||||
"@bitwarden/jslib-angular": "file:jslib/angular",
|
||||
"@bitwarden/jslib-common": "file:jslib/common",
|
||||
"core-js": "^3.11.0",
|
||||
"date-input-polyfill": "^2.14.0",
|
||||
"font-awesome": "4.7.0",
|
||||
"mousetrap": "^1.6.5",
|
||||
"ngx-toastr": "^13.2.1",
|
||||
"ngx-toastr": "14.1.4",
|
||||
"nord": "^0.2.1",
|
||||
"sweetalert2": "^10.16.6",
|
||||
"web-animations-js": "^2.3.2"
|
||||
|
@ -4,7 +4,7 @@ const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||
const AngularCompilerPlugin = require('@ngtools/webpack').AngularCompilerPlugin;
|
||||
const { AngularWebpackPlugin } = require('@ngtools/webpack');
|
||||
|
||||
if (process.env.NODE_ENV == null) {
|
||||
process.env.NODE_ENV = 'development';
|
||||
@ -24,35 +24,24 @@ const moduleRules = [
|
||||
{
|
||||
test: /.(ttf|otf|eot|svg|woff(2)?)(\?[a-z0-9]+)?$/,
|
||||
exclude: /loading.svg/,
|
||||
use: [{
|
||||
loader: 'file-loader',
|
||||
options: {
|
||||
name: '[name].[ext]',
|
||||
outputPath: 'popup/fonts/',
|
||||
publicPath: './fonts/',
|
||||
},
|
||||
}],
|
||||
generator: {
|
||||
filename: 'popup/fonts/[name].[ext]',
|
||||
},
|
||||
type: 'asset/resource',
|
||||
},
|
||||
{
|
||||
test: /\.(jpe?g|png|gif|svg)$/i,
|
||||
exclude: /.*(fontawesome-webfont|glyphicons-halflings-regular)\.svg/,
|
||||
use: [{
|
||||
loader: 'file-loader',
|
||||
options: {
|
||||
name: '[name].[ext]',
|
||||
outputPath: 'popup/images/',
|
||||
publicPath: './images/',
|
||||
},
|
||||
}],
|
||||
generator: {
|
||||
filename: 'popup/images/[name].[ext]',
|
||||
},
|
||||
type: 'asset/resource',
|
||||
},
|
||||
{
|
||||
test: /\.scss$/,
|
||||
use: [
|
||||
{
|
||||
loader: MiniCssExtractPlugin.loader,
|
||||
options: {
|
||||
publicPath: '../',
|
||||
}
|
||||
},
|
||||
'css-loader',
|
||||
'sass-loader',
|
||||
@ -74,19 +63,16 @@ const plugins = [
|
||||
template: './src/popup/index.html',
|
||||
filename: 'popup/index.html',
|
||||
chunks: ['popup/polyfills', 'popup/vendor-angular', 'popup/vendor', 'popup/main'],
|
||||
cache: false, // Remove after upgrading to Webpack 5
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
template: './src/background.html',
|
||||
filename: 'background.html',
|
||||
chunks: ['vendor', 'background'],
|
||||
cache: false, // Remove after upgrading to Webpack 5
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
template: './src/notification/bar.html',
|
||||
filename: 'notification/bar.html',
|
||||
chunks: ['notification/bar'],
|
||||
cache: false, // Remove after upgrading to Webpack 5
|
||||
}),
|
||||
new CopyWebpackPlugin({
|
||||
patterns: [
|
||||
@ -109,7 +95,7 @@ const plugins = [
|
||||
'ENV': JSON.stringify(ENV)
|
||||
}
|
||||
}),
|
||||
new AngularCompilerPlugin({
|
||||
new AngularWebpackPlugin({
|
||||
tsConfigPath: 'tsconfig.json',
|
||||
entryModule: 'src/popup/app.module#AppModule',
|
||||
sourceMap: true,
|
||||
@ -117,6 +103,9 @@ const plugins = [
|
||||
new CleanWebpackPlugin({
|
||||
cleanAfterEveryBuildPatterns: ['!popup/fonts/**/*'],
|
||||
}),
|
||||
new webpack.ProvidePlugin({
|
||||
process: 'process/browser',
|
||||
}),
|
||||
];
|
||||
|
||||
|
||||
@ -174,6 +163,12 @@ const config = {
|
||||
extensions: ['.ts', '.js'],
|
||||
symlinks: false,
|
||||
modules: [path.resolve('node_modules')],
|
||||
fallback: {
|
||||
'assert': false,
|
||||
'buffer': require.resolve('buffer/'),
|
||||
'util': require.resolve('util/'),
|
||||
'url': require.resolve('url/'),
|
||||
},
|
||||
},
|
||||
output: {
|
||||
filename: '[name].js',
|
||||
|
Loading…
Reference in New Issue
Block a user