-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Remove min js file from TheAdmin #17523
Conversation
Why remove instead of fixing that it wasn't created? |
Please read: #17522 (comment) |
@Piedone apparently in OC we no longer need to support two versions. We only commit the minified version to the repo. The ResourceDebugMode is no longer applicable to the OC files. |
Only for assets built with Parcel. We don't need the unminified version of that file served. We need .map files which will be served or not based on the ResourceDebugMode config. Only few of these .min files got removed from the Asset Manager PR. So, I'm not bothered at all. |
What I remember discussing at the meeting is that eventually we won't need the non-minified versions. I wasn't aware that we can't have non-minified versions right now. That's not good, especially that if I understand correctly, map file generation is not quite there yet. Because this prevents us properly debugging JS. |
Alright let me fix this all. I'll merge the other PR and then explain. Just had a long discussion with @sebastienros on today's meeting on how we will add .map files. |
Great, thank you! |
So, the entire issue with Parcel is:
When we set Parcel to output a .map file it will add a line at the end of the compiled asset that gives a reference to the path where the .map file is. If we want to still use the ResourceManager to have a debug and prod asset we need to create a file that has no reference to the .map file as the prod one. So, I will need to figure out how to trigger Parcel.run() twice to output: file.map.js --> (debug) minified Or simply harvest for files in the output folder with a separate process and remove that .map reference from it and create a new file out of it. Or, we simply disallow hosting the .map file even though there is a reference to the .map in the file. |
Or we create a new action that does exactly what we want but without using Parcel. I will take some time to think about it. Parcel story needs to work as much as others that allows to configure these with .config files. Quickly, I think that Vite and Webpack can produce both minified and unminified assets from a single compilation. Also, we need to think about a solution that will work with all of these bundlers. |
So to summarize I think we need both:
Though, there is always the Gulp pipeline if we're not satisfied yet of the Asset Manager. It is using Parcel, Webpack and Vite as they are built ... |
Fixes #17522