My package is structured as follows:
mypackage
|--- src
| |--- component1
| `--- component2
`--- dist
|--- component1
`--- component2
When I publish it to npm, I would like it to look like the following, without the dist
directory:
mypackage
|--- component1
`--- component2
The idea is that when I import from this package, the imports should look file this:
import component1 from 'mypackage/component1'
an not this (notice the extra dist
):
import component1 from 'mypackage/dist/component1'
How to achieve this? I currently have a files section in my package.json which publishes with the extra dist
and I don't want that:
"files": [
"dist/"
]