Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to solve the loader problem of vue-cli creating project

Shulou Source: shulou.com Published: 2022-05-31 12:00:16 09月21日 Update

This article mainly introduces "how to solve the loader problem of vue-cli creation project". In daily operation, I believe many people have doubts about how to solve the loader problem of vue-cli creation project. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubt of "how to solve the loader problem of vue-cli creation project". Next, please follow the editor to study!

In creating a project using a vue-cli project, when using a precompiled css language such as sass, you don't need to configure it in config, you just need to install the corresponding loader in the project.

For example:

1. Use sass in the project

$npm I node-sass-D $npm I sass-loader-D

2. When using vuex, even if vux and vux-loader are installed and vux components are used in the project, the project cannot be started. The error is as follows:

These dependencies were not found:*!! VueMurstyleMufferloader? {"minimize": false, "sourceMap": false}!.. / vue-loader/lib/style-compiler/index? {"vue": true, "id": "data-v-28d8bf8a", "scoped": false "hasInlineConfig": false}. / vuxMui loader.jslesslessloader? {"sourceMap": false}!. / vuxMayMayloaderUnitedsrcwhichlewleloader.jsloader.VueMuLloaderLiglyLiglyLoader. Vue-. / ~ / vux/src/components/cell/index.vue*! vue-! StyleMushroom loader? {"minimize": false "sourceMap": false}!.. / vue-loader/lib/style-compiler/index? {"vue": true, "id": "data-v-76475f48", "scoped": false "hasInlineConfig": false}. / vuxMayloader.jslesslessloader? {"sourceMap": false}!. / vuxMayMayloaderUnitedsrcMae loader.jsloaderUbledvueMuyloaderLiglyLoaderLiglyLoader. / / vuxMuyloaderLiglyLiglerLiglyLoader. / ~ / vux/src/components/group/index.vueTo install them. You can run: npm install-- save!! Vuemostel: false, "sourceMap": false}!.. / vue-loader/lib/style-compiler/index? {"vue": true, "id": "data-v-28d8bf8a", "scoped": false "hasInlineConfig": false}. / vuxMui loader.jsless lesslylyloader? {"sourceMap": false}!. / vuxMyLayerGet srcMastyleloader.jsloader.vuxMailoader.vux.vue!! vuestylewayloader: false "sourceMap": false}!.. / vue-loader/lib/style-compiler/index? {"vue": true, "id": "data-v-76475f48", "scoped": false "hasInlineConfig": false}. / vuxMui loader.jsless lesslessloader? {"sourceMap": false}!. / vuxMayMayloaderUnitedsrcwhichle loader.jsloaderUnibles.vuxMuLloaderLiglyLoaderLigand libUnivertypeloading stylesindexload.index.vue > Listening at http://localhost:8080

At a glance, you can determine that there is something wrong with loader, but I have installed dependencies for sass compilation and still can't resolve the error.

Later, I took a look in vux's package and found that less was used in the component, so I installed less dependency to solve the problem.

At this point, the study on "how to solve the loader problem of vue-cli creation project" is over. I hope to be able to solve everyone's doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Tags: Projects problems learning more components help compile see practical next articles methods theories knowledge articles websites languages materials follow errors Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Xiaomi MySQL OPPO Reno MariaDB