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

NPM module includes unnecessary files #923

Closed
nstringham opened this issue Nov 27, 2024 · 4 comments
Closed

NPM module includes unnecessary files #923

nstringham opened this issue Nov 27, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@nstringham
Copy link

Describe the bug
When installing @maplibre/maplibre-gl-style-spec from npm many files are downloaded that are not needed

To Reproduce
Steps to reproduce the behavior:

  1. run npm i @maplibre/maplibre-gl-style-spec
  2. Open node_modules/@maplibre/maplibre-gl-style-spec folder in preferred file system browsing tool
  3. Observe unnecessary files

Expected behavior
The npm module should only contain the js files from the dist folder and a few other important things like package.json

Screenshots
Image

Desktop:

  • OS: Windows 11

Additional context
I am using maplibre/maplibre-gl-style-spec as a sub-dependency of azure-maps-control

@nstringham nstringham added the bug Something isn't working label Nov 27, 2024
@nstringham nstringham changed the title NPM module includes unessisary files NPM module includes unnecessary files Nov 27, 2024
@nstringham
Copy link
Author

nstringham commented Nov 27, 2024

I think this problem can be solved by using a .npmignore file (see npm dcumentation)

@HarelM
Copy link
Collaborator

HarelM commented Nov 27, 2024

The following are the files selected for the package:

I guess it is related to sourcemaps to see the actually code etc.
I'm not sure I fully understand the problem.

BTW, If you are using a windows machine for JavaScript development I advise to use WSL, its's a lot faster...

@HarelM
Copy link
Collaborator

HarelM commented Nov 27, 2024

I also don't see this here:
https://unpkg.com/browse/@maplibre/[email protected]/

Are you sure you are using the latest package and that your npm cache is cleared?

@nstringham
Copy link
Author

Ope, it looks like my project is using version 19.3.3 my bad. Yeah it seems to be fixed in recent versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants