webpacker

semantic-ui dropdown menu functionality not working in rails 6

99封情书 提交于 2021-02-10 20:40:45
问题 I added semantic-ui gem in gemfile everything is working fine but dropdown menu is not working. I did not find any solution anywhere, is this an issue in gem to use in rails6? here is javascript code in application.js file. require("jquery") require("@rails/ujs").start() require("turbolinks").start() require("@rails/activestorage").start() require("channels") require("semantic-ui") require("bootstrap/dist/js/bootstrap") // Uncomment to copy all static images under ../images to the output

semantic-ui dropdown menu functionality not working in rails 6

孤人 提交于 2021-02-10 20:40:44
问题 I added semantic-ui gem in gemfile everything is working fine but dropdown menu is not working. I did not find any solution anywhere, is this an issue in gem to use in rails6? here is javascript code in application.js file. require("jquery") require("@rails/ujs").start() require("turbolinks").start() require("@rails/activestorage").start() require("channels") require("semantic-ui") require("bootstrap/dist/js/bootstrap") // Uncomment to copy all static images under ../images to the output

Q: How to ensure vendor chunk hash doesn't change with webpacker?

非 Y 不嫁゛ 提交于 2021-02-10 15:00:55
问题 I have a Rails 6 project with webpacker 4.2.2 configured to split vendor chunks into individual files: # config/webpack/environment.js const { environment } = require('@rails/webpacker') const webpack = require('webpack') environment.config.merge({ plugins: [ new webpack.HashedModuleIdsPlugin(), ], optimization: { minimize: true, runtimeChunk: 'single', splitChunks: { chunks: 'all', maxInitialRequests: Infinity, minSize: 0, cacheGroups: { // @see https://hackernoon.com/the-100-correct-way-to

Q: How to ensure vendor chunk hash doesn't change with webpacker?

隐身守侯 提交于 2021-02-10 14:59:31
问题 I have a Rails 6 project with webpacker 4.2.2 configured to split vendor chunks into individual files: # config/webpack/environment.js const { environment } = require('@rails/webpacker') const webpack = require('webpack') environment.config.merge({ plugins: [ new webpack.HashedModuleIdsPlugin(), ], optimization: { minimize: true, runtimeChunk: 'single', splitChunks: { chunks: 'all', maxInitialRequests: Infinity, minSize: 0, cacheGroups: { // @see https://hackernoon.com/the-100-correct-way-to

Q: How to ensure vendor chunk hash doesn't change with webpacker?

我怕爱的太早我们不能终老 提交于 2021-02-10 14:58:45
问题 I have a Rails 6 project with webpacker 4.2.2 configured to split vendor chunks into individual files: # config/webpack/environment.js const { environment } = require('@rails/webpacker') const webpack = require('webpack') environment.config.merge({ plugins: [ new webpack.HashedModuleIdsPlugin(), ], optimization: { minimize: true, runtimeChunk: 'single', splitChunks: { chunks: 'all', maxInitialRequests: Infinity, minSize: 0, cacheGroups: { // @see https://hackernoon.com/the-100-correct-way-to

Select2 Css is not loading via yarn or assets precompile

坚强是说给别人听的谎言 提交于 2021-01-29 18:01:29
问题 I am running into a strange issue where everything is working as expected except select2. I am having Rails 6.0.0 app and installed select2 via yarn add select2 . Then i added it to application.js file. File looks like below. #app/javascripts/packs/application.js require("@rails/ujs").start() require("turbolinks").start() require("@rails/activestorage").start() require("channels") require('datatables.net') require('datatables.net-dt') require('datatables.net-bs4') require('select2') import

Module not found: Error: Can't resolve 'cropbox' 2

走远了吗. 提交于 2021-01-29 16:27:49
问题 I asked question Module not found: Error: Can't resolve 'cropbox' But I didn't get an answer, so I have to focus on more specific issues and searching in StackOverflow, So that I get three problem 1 rails doesn't load cropbox.js 2 clopbox.js couldn't export cropbox function 3 fileUplod.js couldn't import cropbox function this is the result what the as one of the above problem part of application.html.erb: <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %

Module not found: Error: Can't resolve 'cropbox'

你说的曾经没有我的故事 提交于 2021-01-29 16:16:04
问题 Environment: Rails 6.0.2 Ruby 2.5.3 I installed cropperjs with yarn, Then I wanted to use cropper.js, but I got this error, It seems to be couldn't import cropbox module in fileUpload.js so, I changed the path, Sadly I couldn't import cropbox, would you like to help me? app/javascript/packs/fileUpload.js: import cropbox from 'cropbox' **#Here is problem ** uppy.on('upload-success', (file, response) => { // retrieve uploaded file data const uploadedFileData = response.body['data'] // set

Loading webpacker assets in production

时间秒杀一切 提交于 2021-01-28 13:52:04
问题 I'm trying to deploy to production (on a local machine) a Rails 5.2 app which uses webpacker for assets managemnet (I have totally replaced the assets pipeline). Everything seems ok: as part of my deployment process I run the webpacker:compile task and both JS and CSS are compiled in the public/packs folder. However, the assets aren't loaded from the app even if they are correctly linked. Am I missing anything here? I have tried to load via browser other files in the /public folder (i.e.

Cannot find module '@rails/ujs' - Rails 6 Webpack App

被刻印的时光 ゝ 提交于 2021-01-28 01:43:00
问题 I have these errors in a Rails 6 app and all javascript is not working: ERROR in ./app/javascript/packs/application.js Module not found: Error: Can't resolve '@rails/activestorage' in '/Users/jrsahuquillo/Dropbox/myappname/app/javascript/packs' @ ./app/javascript/packs/application.js 9:0-31 ERROR in ./app/javascript/packs/application.js Module not found: Error: Can't resolve '@rails/ujs' in '/Users/jrsahuquillo/Dropbox/myappname/app/javascript/packs' @ ./app/javascript/packs/application.js 5