cnpm install style-loader --save-dev
cnpm install css-loader --save-dev
cnpm install file-loader --save-dev123123
2.安装elementUi模块
cnpm install element-ui@next -S11
3.在webpack.base.conf.js中添加配置
{
test: /\\\\\\\\.css$/,
loader: "style!css"
},
{
test: /\\\\\\\\.(eot|woff|woff2|ttf)([\\\\\\\\?]?.*)$/,
loader: "file"
}1234567812345678
4.然后在 main.js 引入并注册
import Element from 'element-ui'
import 'element-ui/lib/theme-default/index.css'
Vue.use(Element)
.安装以下模块,让webpack可以解析css文件cnpm install style-loader --save-dev
cnpm install css-loader --save-dev
cnpm install file-loader --save-dev123123
2.安装elementUi模块
cnpm install element-ui@next -S11
3.在webpack.base.conf.js中添加配置
{
test: /\\\\\\\\.css$/,
loader: "style!css"
},
{
test: /\\\\\\\\.(eot|woff|woff2|ttf)([\\\\\\\\?]?.*)$/,
loader: "file"
}1234567812345678
4.然后在 main.js 引入并注册
import Element from 'element-ui'
import 'element-ui/lib/theme-default/index.css'
Vue.use(Element)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)