mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 13:53:34 +00:00
convert to ngtools/webpack for aot compilation
This commit is contained in:
@@ -4,6 +4,7 @@ const merge = require('webpack-merge');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const GoogleFontsPlugin = require("google-fonts-webpack-plugin");
|
||||
const ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
const AngularCompilerPlugin = require('@ngtools/webpack').AngularCompilerPlugin;
|
||||
|
||||
const isVendorModule = (module) => {
|
||||
if (!module.context) {
|
||||
@@ -30,9 +31,8 @@ const common = {
|
||||
loader: 'tslint-loader'
|
||||
},
|
||||
{
|
||||
test: /\.tsx?$/,
|
||||
use: 'ts-loader',
|
||||
exclude: /node_modules\/(?!(@bitwarden)\/).*/
|
||||
test: /(?:\.ngfactory\.js|\.ngstyle\.js|\.ts)$/,
|
||||
loader: '@ngtools/webpack'
|
||||
},
|
||||
{
|
||||
test: /\.(jpe?g|png|gif|svg)$/i,
|
||||
@@ -118,6 +118,11 @@ const renderer = {
|
||||
path: 'fonts/',
|
||||
filename: 'css/fonts.css'
|
||||
}),
|
||||
new AngularCompilerPlugin({
|
||||
tsConfigPath: 'tsconfig.json',
|
||||
entryModule: 'src/app/app.module#AppModule',
|
||||
sourceMap: true
|
||||
}),
|
||||
// ref: https://github.com/angular/angular/issues/20357
|
||||
new webpack.ContextReplacementPlugin(
|
||||
/\@angular(\\|\/)core(\\|\/)esm5/,
|
||||
|
||||
Reference in New Issue
Block a user