palkan / view_component-contrib

A collection of extension and developer tools for ViewComponent
MIT License
369 stars 22 forks source link

Detect Webpack for Rails 7 installs #18

Closed unikitty37 closed 2 years ago

unikitty37 commented 2 years ago

What is the purpose of this pull request?

Improve Webpack detection.

Rails 7 replaces the webpacker gem with jsbundling-rails, so the config/webpack folder is not created; instead, it puts webpack.config.js in the project root.

What changes did you make? (overview)

Changed the USE_WEBPACK definition to check if either is present.

Is there anything you'd like reviewers to focus on?

Checklist

palkan commented 2 years ago

Thanks!