Skip to content
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

fix: add package main file with imports for history and live #16

Merged
merged 3 commits into from
Aug 20, 2021

Conversation

kinnarr
Copy link
Member

@kinnarr kinnarr commented Aug 19, 2021

package.json defines src/metricq.js as main file, when using metricq-js as node package. This PR adds this missing file

@kinnarr kinnarr requested a review from bmario August 19, 2021 13:39
@kinnarr
Copy link
Member Author

kinnarr commented Aug 20, 2021

For webpack 4 support the main field with an existing file is required. Possible imports for live and history are <package>/src/metricq-live or <package>/src/metricq-history

Webpack 5 supports the exports field, so the possible imports for live and history are <package>/metricq-live and <package>/metricq-live. The part after the slash is customisable, for example <package>/live for metricq-live.js

@bmario
Copy link
Member

bmario commented Aug 20, 2021

Please update the example files with the new import

@bmario bmario merged commit e433da5 into master Aug 20, 2021
@bmario bmario deleted the fix-use-as-package branch August 20, 2021 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants