我是vue js的新手,并试图学习这个.我在我的系统中安装了一个全新的vue webpack版本.我有一个css,js和这个主题模板的图像,我想要包含在HTML中,所以我尝试添加它,index.html但我可以看到控制台中的错误,资产没有被添加.当我搜索时,我发现我可以require在main.js文件中使用.但是我收到了错误:
以下我在我的main.js文件中尝试过:
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
require('./assets/styles/vendor.css');
require('./assets/styles/main.css');
require('./assets/scripts/vendor/modernizr.js');
Vue.config.productionTip = false
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
template: '<App/>',
components: { App }
})
Run Code Online (Sandbox Code Playgroud)
虽然我尝试使用import来使用它,但我仍然遇到错误
// The Vue build version to load with the `import` …Run Code Online (Sandbox Code Playgroud)