Hello everyone,

Today, I faced an issue where 3rd party dependency is broken after it is 
transpiled by node_modules loader 
<https://github.com/rails/webpacker/blob/master/package/rules/node_modules.js>
.

I'm not 100% sure what was the intention, but based on the code it seems 
that loader tries to transpile code in each package, with the exception of 
babbel/webpack packages. 

This means that not only webpacker dependancies are transiped, but the 
project specific ones as well. To me, this is just asking for trouble. It 
seems inevitable that things will break at some point.

After checking the exclude regex <https://regex101.com/r/CglKdg/5/>, it 
looks like the intention was to target *@rails/actioncable* and 
*@rails/activestorage 
*packages. Since these packages are distributed with the transpiled code, 
is the node_modules loader even needed?

Best,
Mladen

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-core/1affb6fe-b6e7-4879-b442-7edf99d25cac%40googlegroups.com.

Reply via email to