Rails 5/6: How to include JS functions with webpacker?

For instructions on moving from the old asset pipeline to the new webpacker way of doing things, you can see here: https://www.calleerlandsson.com/replacing-sprockets-with-webpacker-for-javascript-in-rails-5-2/ This is a howto for moving from the asset pipeline to webpacker in Rails 5.2, and it gives you an idea of how things are different in Rails 6 now that webpacker is … Read more

Scope Bootstrap Css in Vue

<style scoped src=”https://stackoverflow.com/questions/49653931/~bootstrap/dist/css/bootstrap.css”></style> <style scoped src=”~bootstrap-vue/dist/bootstrap-vue.css”></style> Update: a hack using SCSS Reason why the first solution won’t work: With scoped, the parent component’s styles will not leak into child components. If you want a selector in scoped styles to be “deep”, i.e. affecting child components, you can use the >>> combinator from the Vue doc … Read more