-
Notifications
You must be signed in to change notification settings - Fork 12
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
The deep path is incorrect when set preserveModules to be true #20
Comments
Please justify what is the actual value and what is expected. |
I add import imageSrc from "../../assets/image.txt"
export const imageX = function () {
return imageSrc
} The dist directory structure is like this
The import path in import imageSrc from '../../public/assets/image.txt'; but the import path I expected is import imageSrc from '../../../public/assets/image.txt'; The rollupConfig is same as the keep-imports-with-preserved-modules example
Version: "rollup": "^2.38.0", "rollup-plugin-smart-asset": "^2.1.1" |
The workaround is to put assets folder inside |
The plugin doesn't work well when assets are in parent folder from main entry point file that is |
I use the keep-imports-with-preserved-modules example and add a folder in src/components 。
The demo is here
See the dist/esm/components/cc/index.js , the import path is incorrect and is same as the import path in dist/esm/components/image.js
The text was updated successfully, but these errors were encountered: