I created and published my own npm package. But when i install it in a project, i found i cannot use it like:
import {foo} from 'my-package/src/foo.js'
I don't want provide a index.js in root folder but i want access to src folder and import the module in src
But when i remove the index.js from root, when i import this module, it will have an error:
Can't resolve 'my-package'
Which part should i check to resolve this issue?
question from:
https://stackoverflow.com/questions/65841534/cant-access-to-subfolder-of-my-own-npm-module 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…