excid3 / jumpstart

Easily jumpstart a new Rails application with a bunch of great features by default
http://jumpstartrails.com
MIT License
1.2k stars 316 forks source link

webpack cleanup #160

Closed gathuku closed 1 year ago

gathuku commented 3 years ago

@excid3 can we remove this file containing webpack related content?. We are using the esbuild-rails plugin to load all files with the suffix _channel.js. Someone may not notice the errors but when you import everything in the channel directory(import "./channels") the errors are visible in the console and can cause issues.

require.context is a special feature supported by webpack's compiler that allows you to get all matching modules starting from some base directory

excid3 commented 3 years ago

It does need to be replaced with esbuild import.

Instead of removing channels/index.js, we can just replace the contents with an esbuild import like we do with Stimulus controllers.

import "./**/*_channel.js"
excid3 commented 3 years ago

Also I think we can remove app/javascript/packs folder since it's not being used anymore.

gathuku commented 3 years ago

Please check how the custom.js we can handle custom.js for bootstrap tooltips.