Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Cannot use const enums from plugins #1012

Closed
@PeterStaev

Description

@PeterStaev

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: 6.0.0

  • Cross-platform modules: 6.0.0

  • Android Runtime:6.0.0

  • iOS Runtime:6.0.0

  • Plugin(s):

  • Node.js: 10.16.0

  • Please, attach your package.json and webpack.config.js as these configurations are usually critical for investigating issues with webpack

Describe the bug
Previously it was possible to have an exported const enum defined in a plugin's .d.ts and then use its values in the app. With the new web pack only workflow and new version of the web pack plugin this is no longer possible.

To Reproduce

Expected behavior
Users should be able to use const enums defined in the .d.ts files of plugins/npm packages.

Sample project
const-enum-imports.zip
Tried both with export const and declare const in the .d.ts but neither are working.

Additional context

Metadata

Metadata

Assignees

Labels

docsmigration-to-bundleThe issue is describing a breaking change in the Bundle workflow compared to the Legacy one.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions