Laravel与css装载机混合

时间:2018-05-18 14:19:24

标签: reactjs webpack laravel-5.6 webpack-style-loader laravel-mix

我正在使用Laravel + React项目。请问如何配置webpack.mix.js以使用css加载器?我还安装了css-loader和style-loader作为dev依赖项。

这是我的webpack.mix.js目前的样子:

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.react('resources/assets/js/app.js', 'public/js');
   .sass('resources/assets/sass/app.scss', 'public/css');

0 个答案:

没有答案