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

When installing as an NPM package, you need to provide the path #8

Open
moonglum opened this issue Oct 25, 2018 · 2 comments
Open

When installing as an NPM package, you need to provide the path #8

moonglum opened this issue Oct 25, 2018 · 2 comments
Assignees

Comments

@moonglum
Copy link
Contributor

If you install tabelle as an NPM package, you have to import it like this:

import 'tabelle/dist/tabelle';

We can shorten that to:

import 'tabelle';

by setting the main attribute in the package.json to dist/tabelle.js 😄

@FND
Copy link
Contributor

FND commented Oct 25, 2018

Arguably, depending on your philosophy, main should point at the ESM source: components/molecules/tabelle/tabelle.js.

You could also use module for that though: https://github.com/rollup/rollup/wiki/pkg.module

@moonglum
Copy link
Contributor Author

I would say: Make it as easy as possible to import it 😸

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

No branches or pull requests

3 participants