-
-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show warning for deprecated short imports/require used in application #4375
Comments
NOTE: Until now, we were able to use short imports/requires for all packages coming from This means, that we were able to write: const fileSystem = require("file-system"); // In JS Project
import * as fileSystem from "file-system"; // In TS Project From now on, in case you have such short imports/require, during CLI will not notify you for short imports inside |
Hello, |
Hey @tdhman , |
Hello,
|
Hey @tdhman , |
@tdhman You can try the fix with the |
@miroslavaivanova I install the |
Hey @tdhman , |
Hello @rosen-vladimirov, one of the minified js that cause the tns warning of import is UWA_Standalone_Alone.js. I added this file in my
Sorry for my late response & thank you for your quick response on this issue. |
Hey @tdhman , thanks a lot, we've identified the issue and we've provided a fix in our |
Hello @rosen-vladimirov, I tried the version
|
Hey @tdhman |
Hey @tdhman , |
@rosen-vladimirov I install the latest |
Is your feature request related to a problem? Please describe.
In NativeScript 5.2.0 short imports like
import * as application from "application";
are deprecated, i.e. support for them will be removed in a future version. It would be great in case CLI can analyze the application and report for such imports used in the app.NOTE: Same is applicable for
const application = require("application");
Describe the solution you'd like
During project build/run, CLI should analyze application's code and inform for used short imports. Same is applicable when running
tns doctor
inside project directory.Describe alternatives you've considered
TSLint rule can do the same for TypeScript projects, but it will not work for JS ones. Also the IDE should have integration with TSLint to see the warning.
The text was updated successfully, but these errors were encountered: