laravel 6. * bootstrap error introduced solutions to problems

The following commands are executed in the administrator mode run git

Use Bootstrap front-end framework Laravel project, we need to execute the following command:
$ Composer The require Laravel / ui --dev

The above command after the installation is complete, using the following command introduced on Bootstrap:
$ PHP Artisan UI on Bootstrap

更改引导文件package.json 建议直接导入以下内容,防止后续报错:
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "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": "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": "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.19",
"bootstrap": "^4.0.0",
"cross-env": "^5.1",
"jquery": "^3.2",
"laravel-mix": "^4.0.7",
"lodash": "^4.17.13",
"popper.js": "^1.12",
"resolve-url-loader": "^2.3.1",
"sass": "^1.15.2",
"sass-loader": "^7.1.0",
"vue-template-compiler": "^2.6.10"
}
}

Yarn of expansion packs to install
$ --no-install the Yarn-bin links
$ the Yarn the Add Cross-env // error here will be a problem not control, is not used in the Linux environment, there is no need to write this step.

修改resources/sass/app.scss为
// Bootstrap
@import '~bootstrap/scss/bootstrap';

$ Npm run dev file compiled for the .scss .css
$ npm RUN Watch-poll at each detected .scss file changes automatically compiled into a .css file

Guess you like

Origin www.cnblogs.com/h-s-l/p/11768873.html