NativeScript / nativescript-dev-webpack

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

feat: stop using the proxy `tns-core-modules` package when the `@nativescript/core` is available #1093

Closed DimitarTachev closed 4 years ago

DimitarTachev commented 4 years ago

PR Checklist

What is the current behavior?

It's not possible to use the plugin without the tns-core-modules proxy package because we inject tns-core-modules require statements in the app.

What is the new behavior?

The plugin injects the require statements based on the @nativescript/core package availability.

P.S. The PR is based on the @DickSmith's proposal in this PR with two additional improvements.

1) The code is meant to be backward compatible (it should work with core modules before 6.2.0.) 2) The "short imports" syntax is also supported in the "scoped packages only" flow.

Related to: https://github.com/NativeScript/nativescript-dev-webpack/issues/1089

DimitarTachev commented 4 years ago

test cli-smoke cli-templates cli-plugin cli-preview cli-tests cli-vue cli-build cli-debug cli-device cli-run webpack-apps

rosen-vladimirov commented 4 years ago

test cli-smoke cli-templates cli-plugin cli-preview cli-tests cli-vue cli-build cli-debug cli-device cli-run webpack-apps

Fatme commented 4 years ago

test cli-smoke cli-templates cli-plugin cli-preview cli-tests cli-vue cli-debug cli-device cli-run

Fatme commented 4 years ago

test cli-templates cli-preview cli-test cli-vue cli-debug cli-device cli-run

Fatme commented 4 years ago

test cli-templates cli-preview cli-test cli-vue cli-debug cli-device cli-run

Fatme commented 4 years ago

test cli-smoke cli-templates cli-plugin cli-preview cli-tests cli-vue cli-build cli-debug cli-device cli-run webpack-apps