hupe1980 / gatsby-plugin-material-ui

Gatsby plugin for Material-UI with built-in server-side rendering support
MIT License
136 stars 25 forks source link

.cache published on npm #38

Closed oliviertassinari closed 5 years ago

oliviertassinari commented 5 years ago

@hupe1980 I have noticed that we publish a .cache folder in the npm package. It's strange: https://unpkg.com/browse/gatsby-plugin-material-ui@2.1.5/.cache/. Do you have this folder name configured in your global gitignore?

hupe1980 commented 5 years ago

@oliviertassinari The folder name is configured in the .gitignore: https://github.com/hupe1980/gatsby-plugin-material-ui/blob/5d682933304c1fecf0a136c5847605bba648842b/gatsby-plugin-material-ui/.gitignore#L71

I would say we also need to configure the cache folder in .npmignore

oliviertassinari commented 5 years ago

For the context, I have discovered this curiosity upgrading the dependency in a Gatsby project:

ERROR Failed to compile with 1 errors 23:50:51 This dependency was not found:

  • /Users/hupe/Workspace/wapps/gatsby-plugin-material-ui/e2e-tests/development-runtime/src/styles-provider-props in ./node_modules/gatsby-plugin-material-ui/.cache/styles-provider-props.js

The folder name is configured in the .gitignore:

Then I don't understand how it's happening. I would expect npm to use this gitignore file if no npmignore file can be found.

hupe1980 commented 5 years ago

We already have a .npmignore.

oliviertassinari commented 5 years ago

Then the .gitignore is ignored, as well as the .cache rule, mystery solved :).

I would say we also need to configure the cache folder in .npmignore

👍

hupe1980 commented 5 years ago

@oliviertassinari I fixed the issue.

oliviertassinari commented 5 years ago

Well done!