mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-18 13:51:27 +08:00
refactor: Application modules to classes
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
const webpack = require("@nativescript/webpack");
|
||||
|
||||
const CircularDependencyPlugin = require('circular-dependency-plugin');
|
||||
|
||||
module.exports = (env) => {
|
||||
webpack.init(env);
|
||||
|
||||
@ -10,9 +12,25 @@ module.exports = (env) => {
|
||||
Object.assign(args[0], {
|
||||
__CI__: !!process.env.CI,
|
||||
})
|
||||
|
||||
|
||||
return args
|
||||
})
|
||||
|
||||
config.plugin('CircularDependencyPlugin').use(CircularDependencyPlugin, [
|
||||
{
|
||||
// exclude detection of files based on a RegExp
|
||||
// exclude: /a\.js|node_modules/,
|
||||
// include specific files based on a RegExp
|
||||
include: /application/,
|
||||
// add errors to webpack instead of warnings
|
||||
// failOnError: true,
|
||||
// allow import cycles that include an asyncronous import,
|
||||
// e.g. via import(/* webpackMode: "weak" */ './file.js')
|
||||
// allowAsyncCycles: false,
|
||||
// set the current working directory for displaying module paths
|
||||
// cwd: process.cwd(),
|
||||
}
|
||||
])
|
||||
})
|
||||
|
||||
return webpack.resolveConfig();
|
||||
|
Reference in New Issue
Block a user