node fs functions are undefined #4790
Replies: 8 comments
-
What are you trying to do here? There is no filesystem in the browser (at least by default) |
Beta Was this translation helpful? Give feedback.
-
I’m trying to get the names of all the files in the dist folder |
Beta Was this translation helpful? Give feedback.
-
This isn't possible with readDir, something like this might work for you: import assets from "./*.png";
// assets = { "a.png": "....", "b.png": ... } |
Beta Was this translation helpful? Give feedback.
-
Well I'm essentially trying to get the names of the js files after building in the list folder with the hashes. |
Beta Was this translation helpful? Give feedback.
-
Even if Parcel replaced I think you are mixing up server and client JS |
Beta Was this translation helpful? Give feedback.
-
Is there anyway to get the names with hashes after building? Im essentially trying to inject my scripts so they can reload after transition but idk the names of the hashes so I have to change it every time. This is thing I need to do for barbjs transitions.
|
Beta Was this translation helpful? Give feedback.
-
So you need #4200? |
Beta Was this translation helpful? Give feedback.
-
Yep, assuming its not yet implemented in Parcel 2? |
Beta Was this translation helpful? Give feedback.
-
🐛 bug report
🎛 Configuration (.babelrc, package.json, cli command)
🤔 Expected Behavior
FS should read directory and print out filenames
😯 Current Behavior
💁 Possible Solution
🔦 Context
💻 Code Sample
🌍 Your Environment
Beta Was this translation helpful? Give feedback.
All reactions