Use babel-plugin-component import specified component mint-ui component
module.exports = {
build: {
babel: {
plugins: [
['component', [{
libraryName: 'mint-ui',
style: true
}]]
]
}
}
}
ERROR in ./~/mint-ui/lib/button/style.css
Module parse failed: /Users/xx/Desktop/work/project/xx/node_modules/mint-ui/lib/button/style.css Unexpected token (10:0)
You may need an appropriate loader to handle this file type.
| /* Radio Component */
| /* z-index */
| .mint-button {
| -webkit-appearance: none;
| -moz-appearance: none;
@ ./~/mint-ui/lib/button/style.css 4:14-38 13:2-17:4 14:20-44
@ ./~/babel-loader/lib?{"plugins":[["component",[{"libraryName":"mint-ui","style":true}]]],"presets":[["es2015",{"modules":false}],"stage-2"]}!./~/vue-loader/lib/selector.js?type=script&index=0!./pages/about.vue
@ ./pages/about.vue
@ ./.nuxt/router.js
@ ./.nuxt/index.js
@ ./.nuxt/client.js
@ multi webpack-hot-middleware/client?reload=true ./.nuxt/client.js
ERROR in ./~/mint-ui/lib/font/style.css
Module parse failed: /Users/xx/Desktop/work/project/xx/node_modules/mint-ui/lib/font/style.css Unexpected character '@' (2:0)
You may need an appropriate loader to handle this file type.
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c354">#c354</a>)</em></sub></div>