Closed DimitarTachev closed 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
test cli-smoke cli-templates cli-plugin cli-preview cli-tests cli-vue cli-build cli-debug cli-device cli-run webpack-apps
test cli-smoke cli-templates cli-plugin cli-preview cli-tests cli-vue cli-debug cli-device cli-run
test cli-templates cli-preview cli-test cli-vue cli-debug cli-device cli-run
test cli-templates cli-preview cli-test cli-vue cli-debug cli-device cli-run
test cli-smoke cli-templates cli-plugin cli-preview cli-tests cli-vue cli-build cli-debug cli-device cli-run webpack-apps
PR Checklist
What is the current behavior?
It's not possible to use the plugin without the
tns-core-modules
proxy package because we injecttns-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