I understand that there is some debate about using webpacker in Rails machines, but I have a simple utility and there is currently a workaround. I would like to know about the best (best?) Solution.
In this rails engine, I have a webpacker setting in the "spec / dummy" directory, and everything works fine in dev: https://github.com/RealEstateWebTools/property_web_scraper/tree/master/spec/dummy/config/webpack
When the engine is used by the rails application, it will not find the compiled webpack files, so every time I have a ready release, I collect the webpack files and manually copy them to the vendor directory: https://github.com/RealEstateWebTools/property_web_scraper/tree/ master / vendor / assets / javascripts
Then I require this file here: https://github.com/RealEstateWebTools/property_web_scraper/blob/master/app/assets/javascripts/property_web_scraper/spp_vuetify.js
In my layout, I use the above file using the good old "javascript_include_tag" stars: https://github.com/RealEstateWebTools/property_web_scraper/blob/master/app/views/layouts/property_web_scraper/spp_vuetify.html
There is a check in the layout to make sure that I run the spec / dummy application, in which case I will use the user's webpacker, as it will usually be used in dev.
There must be a better way than this.
No one has answered this question yet.
See related questions:
Source: https://habr.com/ru/post/1690995/More articles:How can I use the MongoDB driver with the C # ASP.NET Core API? - c #How to limit the number of buttons that a player can click in a simple HTML game? - javascriptLogisticRegression scikit studies covariance (column) learning issues - pythonchai-as-promised: multiple pending statements in one test - javascriptDirect and lower restriction on FloatingActionButton makes it invisible - androidDelete / delete array elements that form a PHP pair - arraysReact Native (iOS) AppRegistry module is not a registered called module (runApplication call) - iosAffirm that an event has been observed - javascriptGoogle Cloud Feature Error: "Unable to decode type from Firestore value" - javascriptJPMS/Jigsaw Отсутствует основной класс в модуле - javaAll Articles