Hi Chris, regarding Yarn. Do we have to use Yarn in Rails 6 or can we use NPM and the package.json file? Is there an advantage to using Yarn vs NPM? Thanks!
You can use either but stick to one. Yarn I believe was created by facebook as an alternative to NPM due to some issues they had. Yarn is also faster I believe.
Awesome, I got it all working on a standard form but the calendar doesn't display on an Ajax form. I assume my "_edit_info.js" needs to call flatpickr. Or what's the best way to go about this? Thanks
Figured it out:
document.getElementById("userinfodiv").innerHTML = "<%= j render 'editinfo' %>"
altFormat: "F j, Y",
I have created a new Rails 6 (rc1) with the latets version of webpacker (4.0.6) and when I run my app I get the following error
decode.js:32 Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>' at Module.<anonymous> (decode.js:32) at Module../node_modules/querystring-es3/decode.js (decode.js:88) at __webpack_require__ (bootstrap:19) at Object../node_modules/querystring-es3/index.js (index.js:3) at __webpack_require__ (bootstrap:19) at Object.<anonymous> (client:6) at Object../node_modules/webpack-dev-server/client/index.js?http://localhost:3035 (client:337) at __webpack_require__ (bootstrap:19) at Object.0 (log.js:47) at __webpack_require__ (bootstrap:19)
Anyone else have expirienced the same issue?
Join 22,346+ developers who get early access to new screencasts, articles, guides, updates, and more.