Skip to content
This repository was archived by the owner on Nov 13, 2023. It is now read-only.

Use import instead of require in ES modules, excep when values are im…#92

Merged
cristianoc merged 4 commits into
masterfrom
es6_require_only_for_import_value
Nov 10, 2018
Merged

Use import instead of require in ES modules, excep when values are im…#92
cristianoc merged 4 commits into
masterfrom
es6_require_only_for_import_value

Conversation

@cristianoc

@cristianoc cristianoc commented Nov 9, 2018

Copy link
Copy Markdown
Collaborator

…ported.

Imported values lead to cyclic imports between the generated file and the .bs.js file. So in case of imported JS values in Reason, requires are emitted. In other cases, for ES6, imports are emitted.

TypeScript still needs looking into. Two outstanding issues are: 1) ReasonReact.js is not found anymore. 2) .bs.js files do not default to “any” anymore, and type errors are given.

…ported.

Imported values lead to cyclic imports between the generated file and the `.bs.js` file. So in case of imported values, requires are emitted. In other cases, for ES6, imports are equipped.

TypeScript still needs lookint into. Two outstanding issues is e.g. ReasonReact.js is not found. Another issue is that .bs.js files are do not default to “any” anymore, and type errors are given.
@cristianoc
cristianoc merged commit 72d3106 into master Nov 10, 2018
@cristianoc
cristianoc deleted the es6_require_only_for_import_value branch November 10, 2018 09:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant