github NativeScript/NativeScript webpack-5.0.0
@nativescript/webpack@5.0.0: A new era!

latest releases: 8.7.2-core, 5.0.21-webpack, 5.0.20-webpack...
2 years ago

This is a major release of @nativescript/webpack that is now rebuilt from the ground up with ease of upgrading and customizing in mind.

Most new projects were already using the beta version of @nativescript/webpack so there's a good chance your project is already compatible.

The docs cover how the new configuration works: https://docs.nativescript.org/webpack.html

Upgrading from @nativescript/webpack beta/rc

If you are already using the beta or rc versions, update to 5.0.0 by changing the version in package.json or using the following command:

npm i --save-dev @nativescript/webpack

Upgrading from @nativescript/webpack <5

To upgrade, delete your old webpack.config.js (create a backup if you have done any customizations to it) and then install the latest 5.0.0 version:

npm i --save-dev @nativescript/webpack

Initialize a new config:

npx nativescript-webpack init

The new config should look something like this:

const webpack = require("@nativescript/webpack");

module.exports = (env) => {
  webpack.init(env);

  // Learn how to customize:
  // https://docs.nativescript.org/webpack

  return webpack.resolveConfig();
};

Next step is to re-add your customizations if any. Please refer to the docs for examples.

Don't miss a new NativeScript release

NewReleases is sending notifications on new releases.