Last active
June 7, 2020 17:14
-
-
Save almokhtarbr/e1795a9d3b94eed36392d231223f9ee2 to your computer and use it in GitHub Desktop.
bootstrap rails 6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yarn add bootstrap jquery popper.js | |
javascripts/packs/application.js | |
require('bootstrap') | |
assets/stylesheets/application.css | |
*= require bootstrap | |
*= require_tree . | |
config/webpack/environments.js | |
const { environment } = require('@rails/webpacker') | |
const webpack = require('webpack') | |
environment.plugins.append('Provide', new webpack.ProvidePlugin({ | |
$: 'jquery', | |
jQuery: 'jquery', | |
Popper: ['popper.js', 'default'] | |
})) | |
module.exports = environment | |
./bin/webpack-dev-server | |
Run rails assets:clobber to delete all your compiled webpacks under the public/packs folder. This is useful when you simply want to reset and start a fresh webpack compilation. | |
to deploy | |
webpacker:compile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment