symfony / stimulus-bridge

Stimulus integration bridge for Symfony projects
https://symfony.com/ux
75 stars 15 forks source link

SECURITY - control the output CSS & JS file names #31

Closed benr77 closed 3 years ago

benr77 commented 3 years ago

I notice that the output filenames inserted in to the HTML document are quite verbose, and also give away the use of Symfony in the backend, which in my opinion is not a particularly good thing.

For example, I'm using the Charts UX package and see this in my HTML document

/build/vendors-node_modules_symfony_stimulus-bridge_dist_index_js-node_modules_symfony_ux-chartjs_di-35626c.css

Is it possible to change the name of this output file - mainly to remove the Symfony / Stimulus Bridge identifiers?

Any thoughts?

Thank you.

tgalopin commented 3 years ago

These names are only there in development and they are provided by Webpack 5 to help understand which files are compiled. You should be fine when running the prod build.

benr77 commented 3 years ago

Good point - I'd forgotten about the prod build output being different. My bad.

Thanks for the clarification.