If you have a file inside /packs called application.js that has a line
"import Something from '../some_js'", webpacker will include the code from
"some_js.js" inside the resulting bundle "application.js".
El lun., 23 dic. 2019 a las 12:10, fugee ohu ()
escribió:
>
>
> On Sunday, December 22,
On Sunday, December 22, 2019 at 6:10:58 PM UTC-5, Ariel Juodziukynas wrote:
>
> There's a section specifying where to put js files on the documentation
> https://github.com/rails/webpacker#paths. You can put the files anywhere,
> if you put them inside the packs folder webpacker will create
There's a section specifying where to put js files on the documentation
https://github.com/rails/webpacker#paths. You can put the files anywhere,
if you put them inside the packs folder webpacker will create bundles using
those files, if you put them elsewhere wenpacker will bundle them inside
the
Where do I put my custom javascript files now, under javascripts or under
javascripts/packs or should i create a directory like 'custom' under
javascripts and then in javascript/packs/application.js i would have to
import "../custom" and that would import all the javascript files in the
custom
4 matches
Mail list logo