Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: add specifier in package.json to expose all files in ./dist #702

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

revosw
Copy link
Contributor

@revosw revosw commented Nov 21, 2024

Possibly fixes #700, #701 so that import "@glidejs/glide/css/glide.core.css" for example works again

Note that this is NOT TESTED. It seems legit that "./dist/*": "./dist/*" does expose all files in dist, but I have not personally tested that it works.

Fixes #700, #701 so that `import "@glidejs/glide/css/glide.core.css"` for example works again
@revosw
Copy link
Contributor Author

revosw commented Nov 21, 2024

I have now tested it by:

  1. Creating a brand new React vite project
  2. pnpm install @glidejs/glide
  3. Manually go to node_modules/@glidejs/glide/package.json and adding the "./dist/*": "./dist/*" specifier to exports
  4. Doing pnpm run dev in the React project

I don't get any errors. When importing glide.core.css, the sources panel in devtools says that it is imported. When removing the import, it disappears from the sources panel. I think this is good

@revosw
Copy link
Contributor Author

revosw commented Nov 21, 2024

I don't seem to get any autocomplete for glide.esm.js, glide.js and glide.modular.esm.js. I do get all the autocomplete for the css files, however
image

@jedrzejchalubek jedrzejchalubek merged commit 5808424 into glidejs:master Nov 22, 2024
3 checks passed
@jedrzejchalubek
Copy link
Member

This should allow people to build their projects again. In the meantime I will think how to reorganize this exports, thanks

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants