jumpstart icon indicating copy to clipboard operation
jumpstart copied to clipboard

webpack cleanup

Open gathuku opened this issue 3 years ago • 3 comments

@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

gathuku avatar Oct 21 '21 16:10 gathuku

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 avatar Oct 21 '21 20:10 excid3

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

excid3 avatar Oct 21 '21 20:10 excid3

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

gathuku avatar Oct 22 '21 21:10 gathuku