(Link which I referred to create a library build)
Now how should I use this library build in some other project, I have created and uploaded the lib build as an npm package .
What should I add to view the library components in new Project after npm i
Steps Done
- - Package.json for library creation project
"main": "./dist/reporting-ui-component.umd.js",
"module": "./dist/reporting-ui-component.es.js",
"exports": {
".": {
"import": "./dist/reporting-ui-component.es.js",
"require": "./dist/reporting-ui-component.umd.js"
}
},
- Output for the above library build
| dist
|--- reporting-ui-component.es.js
|--- reporting-ui-component.umd.js
Created a npm package an published it as an artifactory with name - @reporting-ui-component
Now I am planning to install the library in other project, but it gives an error
Error [plugin: vite:dep-scan] Failed to resolve entry for package "@reporting-ui-component". The package may have incorrect main/module/exports specified in its package.json.
Need solution on how to import this package and start working ?