Last active
July 23, 2018 07:34
-
-
Save dschniepp/9bd92bceab3fc64ee3489e4e77bbf018 to your computer and use it in GitHub Desktop.
Boostraping Boostrap 4 with laravel mix
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
window.Popper = require('popper.js').default; | |
try { | |
window.$ = window.jQuery = require('jquery'); | |
require('bootstrap'); | |
} catch (e) {} |
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
@import "../../node_modules/bootstrap/scss/bootstrap"; |
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
{ | |
"/assets/js/main.js": "/assets/js/main.js", | |
"/assets/css/main.css": "/assets/css/main.css" | |
} |
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
{ | |
"private": true, | |
"scripts": { | |
"dev": "npm run development", | |
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", | |
"watch": "npm run development -- --watch", | |
"watch-poll": "npm run watch -- --watch-poll", | |
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", | |
"prod": "npm run production", | |
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" | |
}, | |
"devDependencies": { | |
"axios": "^0.18", | |
"bootstrap": "^4.0.0", | |
"popper.js": "^1.12", | |
"cross-env": "^5.1", | |
"jquery": "^3.2", | |
"laravel-mix": "^2.0", | |
"lodash": "^4.17.4", | |
"vue": "^2.5.7" | |
} | |
} |
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
let mix = require('laravel-mix'); | |
/* | |
|-------------------------------------------------------------------------- | |
| Mix Asset Management | |
|-------------------------------------------------------------------------- | |
| | |
| Mix provides a clean, fluent API for defining some Webpack build steps | |
| for your Laravel application. By default, we are compiling the Sass | |
| file for the application as well as bundling up all the JS files. | |
| | |
*/ | |
mix.js('assets/js/bootstrap.js', 'assets/js/main.js') | |
.sass('assets/sass/custom.scss', 'assets/css/main.css'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment