Module parse failed: Unexpected token (1:0)

problem description

ERROR in. / node_modules/vux/src/components/alert/index.vue
Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type.
| < template >
| < div class= "vux-alert" >
| < x-dialog
@. / node_modules/vux/src/plugins/alert/util.js 3:0-52
@. / node_modules/vux/src/plugins/alert/index.js
@. / src/app.js
@ multi (webpack)-dev-server/client ? http://localhost:8080 webpack/hot/dev-server. / src/app.js

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

use vux, but manually configure it yourself

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?

Dec.21,2021

refer to the official manual for installation. Vux2 must be used with vux-loader. Please refer to the following code for configuration in build/webpack.base.conf.js:

const vuxLoader = require ('vux-loader')
const webpackConfig = originalConfig / / the original module.exports code assigns a value to the variable webpackConfig

module.exports = vuxLoader.merge (webpackConfig, {
plugins: ['vux-ui']
})


Building owner, missing vux-loader , please refer to the project template provided by vux2. Portal

Menu