【发布时间】:2019-02-26 13:49:12
【问题描述】:
我正在尝试使用 Laravel Mix 来为我的 Laravel 5.5 应用程序编译我的 SASS/JS 但是当我编辑我的 app.scss 并运行 npm run dev 时,更改不会反映并且我的主体颜色仍设置为 @ 987654323@ 而不是
// Body
$body-bg: #2296f3;
$body-color: #2296f3;
这是我的 app.scss 目前的样子:
这就是我的 webpack 配置的样子:
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('resources/assets/js/app.js', 'public/js')
.sass('resources/assets/sass/app.scss', 'public/css')
.sass('resources/assets/sass/custom.scss', 'public/css/custom.css');
感谢任何帮助,我完全不确定为什么我的 sass 没有编译。我编译的时候没有错误...
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
95% emitting
DONE Compiled successfully in 3524ms 12:06:10
Asset Size Chunks Chunk Names
fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.eot?f4769f9bdb7466be65088239c12046d1 20.1 kB [emitted]
fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff2?448c34a56d699c29117adc64c43affeb 18 kB [emitted]
fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff?fa2772327f55d8198301fdb8bcfc8158 23.4 kB [emitted]
fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.ttf?e18bbf611f2a2e43afc071aa2f4e1512 45.4 kB [emitted]
fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.svg?89889688147bd7575d6327160d64e760 109 kB [emitted]
/js/app.js 1.24 MB 0 [emitted] [big] /js/app
/css/app.css 154 kB 0 [emitted] /js/app
/css/custom.css 0 bytes 0 [emitted] /js/app
谢谢!
【问题讨论】:
标签: php laravel webpack sass laravel-mix