mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 20:11:24 +08:00
feat(webpack): filter common undesirable warnings by default (#9253)
* feat(webpack): filter common undesirable warnings by default * style: move import line Co-authored-by: Igor Randjelovic <rigor789@gmail.com>
This commit is contained in:
@ -3,6 +3,7 @@ import Config from 'webpack-chain';
|
||||
import { resolve } from 'path';
|
||||
|
||||
import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
|
||||
import FilterWarningsPlugin from 'webpack-filter-warnings-plugin';
|
||||
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
|
||||
import { CleanWebpackPlugin } from 'clean-webpack-plugin';
|
||||
import TerserPlugin from 'terser-webpack-plugin';
|
||||
@ -235,6 +236,13 @@ export default function (config: Config, env: IWebpackEnv): Config {
|
||||
},
|
||||
]);
|
||||
|
||||
// useful for filtering common undesirable warnings
|
||||
config.plugin('FilterWarningsPlugin').use(FilterWarningsPlugin, [
|
||||
{
|
||||
exclude: /System.import/,
|
||||
},
|
||||
]);
|
||||
|
||||
// todo: refine defaults
|
||||
config.plugin('DefinePlugin').use(DefinePlugin, [
|
||||
{
|
||||
|
Reference in New Issue
Block a user