#Tailwind #Webpack resolve-url-loader cannot operate: CSS error


WARNING in ./resources/sass/app.scss (./node_modules/css-loader??ref--5-2!./node_modules/postcss-loader/src??postcss0!./node_modules/resolve-url-loader??ref--5-4!./node_modules/sass-loader/dist/cjs.js??ref--5-5!./resources/sass/app.scss)
Module Warning (from ./node_modules/resolve-url-loader/index.js):
(Emitted value instead of an instance of Error)   resolve-url-loader cannot operate: CSS error
  C:\laragon\www\school\resources\sass\app.scss:114:3688: missing '{'
  at error (C:\laragon\www\school\node_modules\css\lib\parse\index.js:62:15)

後來想起來自己為了讓 CSS 可以走相對路徑,有改過 config processCssUrls: true,
改回 false 這一條錯誤就消失了

const tailwindcss = require('tailwindcss');
mix.js('resources/js/app.js', 'public/js')
   .extract(['vue'])
   .sass('resources/sass/app.scss', 'public/css')
   .options({
       processCssUrls: false,
       postCss: [tailwindcss('./tailwind.config.js')],
       terser: {
        terserOptions: {
            compress: {
               drop_console: true
            }
        }
    }
});

https://github.com/tailwindlabs/tailwindcss/issues/390








你可能感興趣的文章

【JS幼幼班】Step.07 基本語法:物件型別(object、function)

【JS幼幼班】Step.07 基本語法:物件型別(object、function)

[ Day 04 ]用 Puppeteer 來做自動化機器人吧 (三) : 應用篇

[ Day 04 ]用 Puppeteer 來做自動化機器人吧 (三) : 應用篇

JS踩坑筆記 -  function 宣告

JS踩坑筆記 - function 宣告






留言討論