vue refers to elementUI, and the elementui file can be found in node_modules
In webpack.base.conf.js
{
test: /\.css$/,
loader: 'style!css'
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'file',
query: {
limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
}
}
Enter in main.js
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-default/index.css'
Vue.use(ElementUI)
But it’s the output
Try import '../node_modules/element-ui/lib/theme-default/index.css';
Use vue-cli and focus on business logic, environment configuration, etc. Oh~
The problem has been solved with the following steps:
1.cnpm install style-loader -D
2.cnpm install css-loader -D
3.cnpm install file-loader –D
4. Install cnpm install element-ui -S
5 .Introduced in main.js: