Say Goodbye to Short Imports in NativeScript

preview_player
Показать описание
You should update your NativeScript short imports to long imports, and you should do it now.

Many of the NativeScript tutorials you'll find here are bits of knowledge you can just put away for later. But this tip is more of a Public Service Announcement. You should go and act on it now - change your imports. This goes for folks using NativeScript Core, NativeScript Angular, and NativeScript Vue.

The last few versions of NativeScript brought a ton of new features including the Preview app, extended Webpack support, Hot Module Replacement, cloud builds via CLI, etc. Due to the growing complexity of some features, and the concept that Webpack should be available out-of-the-box for all NativeScript applications required the NativeScript team to deprecate short imports.

Q: Wait a minute! What is a short import?
A: An import that is shortened from tns-core-modules/xxxxx to just xxxxx. I show a few examples in the video.

► SHARE
Share this video with a friend to let them know about short imports:
Share the entire NativeScript playlist to help your friends with their native iOS and Android apps written with JavaScript:

► ASK
If you have a topic you want me to make a video about use #iscriptnative in the comments.

►LET'S CONNECT

► FREE + PREMIUM NATIVESCRIPT COURSES
Take 25% off any premium NativeScript course by using the coupon code YOUTUBE
Рекомендации по теме
Комментарии
Автор

i think short import is good but not ideal :)

rrahman-hn
Автор

Hi Alex . What about a short example of code share where you create a nativescript project and you demo how to run on Android iOS and web browser . Thanks

corsaronero
Автор

not sure how to contact you on nativescripting.com, buy you need an update to the course:

create an app-root.xml file in the app folder. in that file place the following code -

<Frame />

Then, for app.js change the last line to read:

applicationModule.run({ moduleName: "app-root" });

jamesprice