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

Handle nested directories within dist folder #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rahulbhanushali
Copy link

Problem

The current version of the library assumes that the ES module file is at the root (/dist) folder and injects the CSS import statement. This import fails to work when vite build generates ES modules within nested directories.

For e.g. if the ES module is outputted to dist/js/ the current import fails.

This commit adds the CSS import statement correctly with respect to the depth of the ES module within dist folder.

Changes

  1. Correctly setup the path for the import statement of the ES module where it is being imported.

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

Successfully merging this pull request may close these issues.

1 participant