Files
NativeScript/apps/automated/webpack.config.js
Igor Randjelovic f64355ba7a refactor: improved core barrel exports and Application class (#10286)
BREAKING CHANGES:

`Application.orientation` is no longer a function.

Migration: Remove `()` from the `Application.orientation()` call:
```diff
import { Application } from "@nativescript/core";

-console.log(Application.orientation());
+console.log(Application.orientation);
```


`Application.systemAppearance` is no longer a function.

Migration: Remove `()` from the `Application.systemAppearance()` call:
```diff
import { Application } from "@nativescript/core";

-console.log(Application.systemAppearance());
+console.log(Application.systemAppearance);
```
2023-05-25 07:45:39 -07:00

40 lines
1.0 KiB
JavaScript

const webpack = require("@nativescript/webpack");
const CircularDependencyPlugin = require('circular-dependency-plugin');
module.exports = (env) => {
webpack.init(env);
webpack.Utils.addCopyRule('ui/web-view/*.html');
webpack.chainWebpack(config => {
config.plugin('DefinePlugin').tap(args => {
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();
};