Module parse failed: Unexpected token

clipboard.png

problem description

css compilation errors in all components when running npm run dev

the environmental background of the problems and what methods you have tried

"vue-loader": "^ 15.4.2",
check into packeg.json and install the latest version vue-loader 15.2.0 (latest vue-loader 15 + or above, webpack configuration file needs to be changed to use vueloaderplugin,)

related codes

/ / Please paste the code text below (do not replace the code with pictures)

what result do you expect? What is the error message actually seen?

add the reason for the error
after vue-loader@15.*, you must configure css-loader separately in addition to the VueLoaderPlugin.
if you are building natively with the latest webpack, install webpck-cli, to configure mode options in webpack.config in addition to installing webpack.
to keep the build environment consistent, use the npm run dev script compilation to ensure that the webpack command is used, and vue-loader is the local version.

Feb.12,2022
Menu