[solved] how to configure sass for mpvue

Business background

use mpvue
for the first time sass before, but it"s all configured by someone else.
has not used webpack

.

my actions

  1. initialize the project according to mpvue tutorial
  2. copy the sample file pages/counter is pages/counter2
  3. modify pages/counter2/index.vue File
  4. add style tag to lang=sass inside.
  5. then in the command line npm run dev

the file cannot be compiled at this time

question

should be mpvue is not configured sass compilation
I"m going to learn webpack and vue-cli , but these two things feel like I can"t get into the door all week
, so how do you configure sass to compile automatically in mpvue ?

solve

install the dependency package directly with npm . After installation, it will compile automatically without configuration.

 npm i sass-loader -D / npm i node-sass -D

reference: https://github.com/Meituan-Di.

Mar.01,2021

just install the dependency package with npm directly. After installation, there is no need to configure, and it will be compiled automatically

npm I sass-loader-D / npm I node-sass-D
reference: https://github.com/Meituan-Dianping/mpvue/issues/232

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e8fba1-45fc2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e8fba1-45fc2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?