Skip to content

CLI warns incorrectly for used short imports in minified code #4435

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

Closed
rosen-vladimirov opened this issue Mar 13, 2019 · 1 comment
Closed
Assignees
Labels
Milestone

Comments

@rosen-vladimirov
Copy link
Contributor

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 5.2.3
  • Cross-platform modules: Not applicable
  • Android Runtime: Not applicable
  • iOS Runtime: Not applicable
  • Plugin(s): Not applicable

Describe the bug
In case you have minified code in your application or just several statements on one line, CLI may warn you that you have short imports, in cases when there aren't such.

To Reproduce

  1. tns create myApp --js
  2. cd myApp
  3. Open app/main-view-model.js and add the following line at the top of the app:
const Observable2 = require("tns-core-modules/data/observable").Observable; console.log("application");
  1. tns prepare android
    This will show warning, while in fact there's no short import in the file.

Expected behavior
CLI should not warn in such case.

@rosen-vladimirov
Copy link
Contributor Author

Related to discussion in: #4375

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants