You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a single build run, I want to walk a folder structure that contains json, css, images, audio, and mp4s so that when a leaf folder is reached, all the assets encountered along its folderpath are used to configure an entry point. To do this, I plan to use a dynamic entry function that returns an object where each key is a query-path and each value is a relative filepath to an index.js.
This works well for the index.js and json and css assets, but it doesn't yet handle non-inline assets. I believe I could do that via the js api. However, I can't figure out the following:
How does the js api relate to the way RsPack is invoked from the commandline to consume rspack.config.mjs? This would tell me how to inspect the Stats object when I build from the commandline.
How can the Stats object be accessed by the dynamic entry function?
In order to get files with content hashes in the filename for all my media files, do I add 'rules':'asset/resource' for all my media types to rspack.config.mjs as a sibling to the entry? That seems unlikely to be accessible to the entry function.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In a single build run, I want to walk a folder structure that contains json, css, images, audio, and mp4s so that when a leaf folder is reached, all the assets encountered along its folderpath are used to configure an entry point. To do this, I plan to use a dynamic entry function that returns an object where each key is a query-path and each value is a relative filepath to an index.js.
This works well for the index.js and json and css assets, but it doesn't yet handle non-inline assets. I believe I could do that via the js api. However, I can't figure out the following:
rspack.config.mjs
? This would tell me how to inspect the Stats object when I build from the commandline.rspack.config.mjs
as a sibling to theentry
? That seems unlikely to be accessible to the entry function.Beta Was this translation helpful? Give feedback.
All reactions