NativeScript / nativescript-dev-webpack

A package to help with webpacking NativeScript apps.
Apache License 2.0
97 stars 49 forks source link

fix: avoid duplicate modules from tns-core-modules and @nativescript/core #1103

Closed DimitarTachev closed 4 years ago

DimitarTachev commented 4 years ago

The AngularCompilerPlugin is resolving the files based on the paths property from the tsconfig and we have to unify the core modules package name in order to avoid duplicate modules causing app crashes on Android.

PR Checklist

What is the current behavior?

vendor.js contains both the @nativescrip/core/ui/application and the proxy tns-core-modules/ui/application in Angular apps with short imports support in their tsconfig:

"paths": {
    "*": [
        "./node_modules/tns-core-modules/*",
        "./node_modules/*"
    ],
    "~/*": [
        "app/*"
    ]
}

What is the new behavior?

We are processing the tsconfig paths and unifying the core modules package name in order too keep a single package name in the generated code.

Related to: may failing Angular related e2e tests

vhristov5555 commented 4 years ago

test --webpack-apps

DimitarTachev commented 4 years ago

test --webpack-apps