mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-18 05:18:39 +08:00
@ -1,4 +1,8 @@
|
|||||||
import { DefinePlugin, HotModuleReplacementPlugin } from 'webpack';
|
import {
|
||||||
|
ContextExclusionPlugin,
|
||||||
|
DefinePlugin,
|
||||||
|
HotModuleReplacementPlugin,
|
||||||
|
} from 'webpack';
|
||||||
import Config from 'webpack-chain';
|
import Config from 'webpack-chain';
|
||||||
import { resolve } from 'path';
|
import { resolve } from 'path';
|
||||||
|
|
||||||
@ -280,6 +284,12 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
|
|||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
// Makes sure that require.context will never include
|
||||||
|
// App_Resources, regardless where they are located.
|
||||||
|
config
|
||||||
|
.plugin('ContextExclusionPlugin|App_Resources')
|
||||||
|
.use(ContextExclusionPlugin, [new RegExp(`(.*)App_Resources(.*)`)]);
|
||||||
|
|
||||||
// Filter common undesirable warnings
|
// Filter common undesirable warnings
|
||||||
config.set(
|
config.set(
|
||||||
'ignoreWarnings',
|
'ignoreWarnings',
|
||||||
|
Reference in New Issue
Block a user