webpacker

How to integrate JqTree in Rails 6 with webpacker, tree is not a function

最后都变了- 提交于 2020-12-04 08:22:06
问题 I am really wanting to know how to integrate jqTree as a webpacker webpack in my Rails 6 application UPDATE:- Using yarn add jqtree seems to have magically cleared up most of my issues however I am currently facing tree is not a function error I am using the Ancestry gem to organise menu items and I need a drag and drop javascript tree view solution that will work nicely with the Ancestry gem. I have picked on jqTree as my desired solutions but I am happy to be persuaded to use an alternative

How to use jQuery with rails webpacker 3

时光毁灭记忆、已成空白 提交于 2020-07-04 06:14:08
问题 I generate a new rails app : rails new titi --webpack=vue and would like to use jQuery (or other libs like popper, vue-resource...). I tried to yarn add jquery which was fine, but I don't have access to jQuery in my JavaScript code. In previous Webpacker gem, there was much more conf and I had to write this in shared.js : module.exports = { ... plugins: [ ... new webpack.ProvidePlugin({ $: 'jquery', jQuery: 'jquery', ] ... resolve: { extensions: settings.extensions, modules: [ resolve

Slow sass-loader Build Times with Webpack

筅森魡賤 提交于 2020-06-10 08:45:29
问题 Summary When we switched to using Webpack for handling our SASS files, we noticed that our build times in some cases became really slow. After measuring the performance of different parts of the build using the SpeedMeasurePlugin, it seems that sass-loader is the culprit…it can easily take 10s to build (it used to take 20s before we made some fixes), which is longer than we’d like. I’m curious if people have additional strategies for optimizing building Sass assets that I didn’t cover. I’ve