Shopify / themekit

Shopify theme development command line tool.
https://shopify.dev/tools/theme-kit
MIT License
1.19k stars 374 forks source link

Files with "node_modules" is getting filtered #986

Open andershagbard opened 1 year ago

andershagbard commented 1 year ago

Describe the bug If you have a file names node_modules_my-file.js Theme Kit will prevent any action against this file. This is because it's filtered in file/filter.go. I don't see why this would be the case.

I can see why it would filter a folder called "node_modules" under a "Shopify folder" (assets, templates, layouts, etc), but I can't see why it would filter a file called this.

_But Anders, why in the world would you call your files something with "nodemodules"?

I use a common setup, with webpack, babel and core-js, and utilize import functions. core-js modules will be imported as modules, and in dev mode, they will be named something like this: node_modules_core-js_modules_web_url-search-params_js.js.

Obviously there are hacky workarounds, but I hope Shopify will take this seriously, and get it fixed asap.

To Reproduce Steps to reproduce the behavior:

  1. run command theme watch
  2. Create a file called assets/node_modules_my_file.js

Expected behavior I would expect this file to be uploaded.

Environment: