mirror of
https://github.com/bitwarden/browser
synced 2024-12-23 00:25:04 +01:00
updated packages and move to webpack 4
This commit is contained in:
parent
f417bb0ccf
commit
aaf774308e
2
jslib
2
jslib
@ -1 +1 @@
|
||||
Subproject commit d0ad8650605ec506704ed76f13f40fd4d33cffcd
|
||||
Subproject commit 832babf704d590bca586454cd1a087f8c48503d6
|
3519
package-lock.json
generated
3519
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
104
package.json
104
package.json
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "bitwarden",
|
||||
"name": "bitwarden-browser",
|
||||
"version": "0.0.0",
|
||||
"scripts": {
|
||||
"sub:init": "git submodule update --init --recursive",
|
||||
@ -21,37 +21,38 @@
|
||||
"test:watch": "karma start"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/compiler-cli": "5.2.0",
|
||||
"@ngtools/webpack": "1.10.2",
|
||||
"@types/chrome": "0.0.51",
|
||||
"@angular/compiler-cli": "^6.1.7",
|
||||
"@ngtools/webpack": "^6.2.1",
|
||||
"@types/chrome": "^0.0.73",
|
||||
"@types/jasmine": "^2.8.8",
|
||||
"@types/lunr": "^2.1.6",
|
||||
"@types/mousetrap": "^1.6.0",
|
||||
"@types/node": "8.0.19",
|
||||
"@types/node-forge": "0.6.10",
|
||||
"@types/papaparse": "4.1.33",
|
||||
"@types/node-forge": "^0.7.5",
|
||||
"@types/papaparse": "^4.5.3",
|
||||
"@types/safari-extension": "^0.0.27",
|
||||
"@types/safari-extension-content": "^0.0.14",
|
||||
"@types/tldjs": "1.7.1",
|
||||
"@types/source-map": "0.5.2",
|
||||
"@types/tldjs": "^1.7.1",
|
||||
"@types/webcrypto": "^0.0.28",
|
||||
"@types/webpack": "^4.4.11",
|
||||
"angular2-template-loader": "^0.6.2",
|
||||
"clean-webpack-plugin": "^0.1.17",
|
||||
"copy-webpack-plugin": "^4.2.0",
|
||||
"cross-env": "^5.1.4",
|
||||
"css-loader": "^0.28.7",
|
||||
"del": "3.0.0",
|
||||
"extract-text-webpack-plugin": "^3.0.1",
|
||||
"file-loader": "^1.1.5",
|
||||
"gulp": "3.9.1",
|
||||
"gulp-filter": "5.0.1",
|
||||
"gulp-google-webfonts": "0.0.14",
|
||||
"clean-webpack-plugin": "^0.1.19",
|
||||
"copy-webpack-plugin": "^4.5.2",
|
||||
"cross-env": "^5.2.0",
|
||||
"css-loader": "^1.0.0",
|
||||
"del": "^3.0.0",
|
||||
"extract-text-webpack-plugin": "next",
|
||||
"file-loader": "^2.0.0",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-filter": "^5.1.0",
|
||||
"gulp-google-webfonts": "^2.0.0",
|
||||
"gulp-if": "^2.0.2",
|
||||
"gulp-json-editor": "2.2.1",
|
||||
"gulp-replace": "^0.6.1",
|
||||
"gulp-xmlpoke": "0.2.1",
|
||||
"gulp-zip": "4.0.0",
|
||||
"html-loader": "^0.5.1",
|
||||
"html-webpack-plugin": "^2.30.1",
|
||||
"gulp-json-editor": "^2.4.2",
|
||||
"gulp-replace": "^1.0.0",
|
||||
"gulp-xmlpoke": "^0.2.1",
|
||||
"gulp-zip": "^4.2.0",
|
||||
"html-loader": "^0.5.5",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
"jasmine-core": "^3.2.1",
|
||||
"jasmine-spec-reporter": "^4.2.1",
|
||||
"karma": "^3.0.0",
|
||||
@ -61,41 +62,42 @@
|
||||
"karma-jasmine": "^1.1.2",
|
||||
"karma-jasmine-html-reporter": "^1.3.1",
|
||||
"karma-typescript": "^3.0.13",
|
||||
"node-sass": "^4.9.2",
|
||||
"sass-loader": "^6.0.6",
|
||||
"style-loader": "^0.19.0",
|
||||
"ts-loader": "^3.5.0",
|
||||
"tslint": "^5.9.1",
|
||||
"tslint-loader": "^3.5.3",
|
||||
"typescript": "^2.7.1",
|
||||
"webpack": "^3.10.0"
|
||||
"node-sass": "^4.9.3",
|
||||
"sass-loader": "^7.1.0",
|
||||
"style-loader": "^0.23.0",
|
||||
"ts-loader": "^5.1.0",
|
||||
"tslint": "^5.11.0",
|
||||
"tslint-loader": "^3.6.0",
|
||||
"typescript": "^2.7.2",
|
||||
"webpack": "^4.18.0",
|
||||
"webpack-cli": "^3.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@angular/animations": "5.2.0",
|
||||
"@angular/common": "5.2.0",
|
||||
"@angular/compiler": "5.2.0",
|
||||
"@angular/core": "5.2.0",
|
||||
"@angular/forms": "5.2.0",
|
||||
"@angular/http": "5.2.0",
|
||||
"@angular/platform-browser": "5.2.0",
|
||||
"@angular/platform-browser-dynamic": "5.2.0",
|
||||
"@angular/router": "5.2.0",
|
||||
"@angular/upgrade": "5.2.0",
|
||||
"@angular/animations": "6.1.7",
|
||||
"@angular/common": "6.1.7",
|
||||
"@angular/compiler": "6.1.7",
|
||||
"@angular/core": "6.1.7",
|
||||
"@angular/forms": "6.1.7",
|
||||
"@angular/http": "6.1.7",
|
||||
"@angular/platform-browser": "6.1.7",
|
||||
"@angular/platform-browser-dynamic": "6.1.7",
|
||||
"@angular/router": "6.1.7",
|
||||
"@angular/upgrade": "6.1.7",
|
||||
"@aspnet/signalr": "1.0.3",
|
||||
"@aspnet/signalr-protocol-msgpack": "1.0.3",
|
||||
"angular2-toaster": "4.0.2",
|
||||
"angulartics2": "5.0.1",
|
||||
"core-js": "2.4.1",
|
||||
"angular2-toaster": "6.1.0",
|
||||
"angulartics2": "6.3.0",
|
||||
"core-js": "2.5.7",
|
||||
"font-awesome": "4.7.0",
|
||||
"lunr": "2.3.3",
|
||||
"mousetrap": "1.6.1",
|
||||
"ngx-infinite-scroll": "0.8.4",
|
||||
"node-forge": "0.7.1",
|
||||
"papaparse": "4.3.5",
|
||||
"rxjs": "5.5.6",
|
||||
"mousetrap": "1.6.2",
|
||||
"ngx-infinite-scroll": "6.0.1",
|
||||
"node-forge": "0.7.6",
|
||||
"papaparse": "4.6.0",
|
||||
"rxjs": "6.3.2",
|
||||
"sweetalert": "2.1.0",
|
||||
"tldjs": "2.3.1",
|
||||
"web-animations-js": "2.3.1",
|
||||
"zone.js": "0.8.19"
|
||||
"zone.js": "0.8.26"
|
||||
}
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ registerLocaleData(localeZhTw, 'zh-TW');
|
||||
clearQueryParams: true,
|
||||
},
|
||||
}),
|
||||
ToasterModule,
|
||||
ToasterModule.forRoot(),
|
||||
InfiniteScrollModule,
|
||||
],
|
||||
declarations: [
|
||||
|
@ -16,7 +16,8 @@
|
||||
"jslib/*": [ "jslib/src/*" ],
|
||||
"@angular/*": [ "node_modules/@angular/*" ],
|
||||
"angular2-toaster": [ "node_modules/angular2-toaster" ],
|
||||
"angulartics2": [ "node_modules/angulartics2" ]
|
||||
"angulartics2": [ "node_modules/angulartics2" ],
|
||||
"node": [ "node_modules/@types/node" ]
|
||||
}
|
||||
},
|
||||
"exclude": [
|
||||
|
@ -11,13 +11,6 @@ if (process.env.NODE_ENV == null) {
|
||||
}
|
||||
const ENV = process.env.ENV = process.env.NODE_ENV;
|
||||
|
||||
const isVendorModule = (module) => {
|
||||
if (!module.context) {
|
||||
return false;
|
||||
}
|
||||
return module.context.indexOf('node_modules') !== -1;
|
||||
};
|
||||
|
||||
const extractCss = new ExtractTextPlugin({
|
||||
filename: '[name].css',
|
||||
disable: false,
|
||||
@ -72,6 +65,11 @@ const moduleRules = [
|
||||
publicPath: '../',
|
||||
}),
|
||||
},
|
||||
// Hide System.import warnings. ref: https://github.com/angular/angular/issues/21560
|
||||
{
|
||||
test: /[\/\\]@angular[\/\\].+\.js$/,
|
||||
parser: { system: true },
|
||||
},
|
||||
];
|
||||
|
||||
const plugins = [
|
||||
@ -79,18 +77,8 @@ const plugins = [
|
||||
path.resolve(__dirname, 'build/*'),
|
||||
]),
|
||||
// ref: https://github.com/angular/angular/issues/20357
|
||||
new webpack.ContextReplacementPlugin(/\@angular(\\|\/)core(\\|\/)esm5/,
|
||||
new webpack.ContextReplacementPlugin(/\@angular(\\|\/)core(\\|\/)fesm5/,
|
||||
path.resolve(__dirname, './src')),
|
||||
new webpack.optimize.CommonsChunkPlugin({
|
||||
name: 'popup/vendor',
|
||||
chunks: ['popup/main'],
|
||||
minChunks: isVendorModule,
|
||||
}),
|
||||
new webpack.optimize.CommonsChunkPlugin({
|
||||
name: 'vendor',
|
||||
chunks: ['background'],
|
||||
minChunks: isVendorModule,
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
template: './src/popup/index.html',
|
||||
filename: 'popup/index.html',
|
||||
@ -156,6 +144,7 @@ if (ENV === 'production') {
|
||||
}
|
||||
|
||||
const config = {
|
||||
mode: ENV,
|
||||
entry: {
|
||||
'popup/main': './src/popup/main.ts',
|
||||
'background': './src/background.ts',
|
||||
@ -167,6 +156,26 @@ const config = {
|
||||
'downloader/downloader': './src/downloader/downloader.ts',
|
||||
'2fa/2fa': './src/2fa/2fa.ts',
|
||||
},
|
||||
optimization: {
|
||||
splitChunks: {
|
||||
cacheGroups: {
|
||||
commons: {
|
||||
test: /[\\/]node_modules[\\/]/,
|
||||
name: 'popup/vendor',
|
||||
chunks: (chunk) => {
|
||||
return chunk.name === 'popup/main';
|
||||
},
|
||||
},
|
||||
commons2: {
|
||||
test: /[\\/]node_modules[\\/]/,
|
||||
name: 'vendor',
|
||||
chunks: (chunk) => {
|
||||
return chunk.name === 'background';
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.ts', '.js'],
|
||||
alias: {
|
||||
|
Loading…
Reference in New Issue
Block a user