我使用了vue-cli
我想要更改main.js和其他vue源文件的路径
因此,我尝试更改build/webpack.base.conf.js文件
像这样。(这是build/webpack.base.conf.js文件的一部分)
(修改前)
module.exports = {
entry: {
app: './src/main.js'
},
(之后)
module.exports = {
entry: {
app: '../src/main.js'
},
我试图启动
npm run dev
但它没有工作
它打印出了这个错误信息
These dependencies were not found:
* vue in ../src/main.js, ../src/store/index.js and 9 others
* vue-router in ../src/main.js
* vuex-router-sync in ../src/main.js
* es6-promise/auto in ../src/main.js
* vuex in ../src/store/index.js
* !!babel-loader!../../myVue/node_modules/vue-loader/lib/selector?type=script&index=0!./App.vue in ../src/components/App.vue
* !!babel-loader!../../myVue/node_modules/vue-loader/lib/selector?type=script&index=0!./Dash.vue in ../src/components/Dash.vue
* !!babel-loader!../../myVue/node_modules/vue-loader/lib/selector?type=script&index=0!./Login.vue in ../src/components/Login.vue
* !!babel-loader!../../myVue/node_modules/vue-loader/lib/selector?type=script&index=0!./404.vue in ../src/components/404.vue
* !!babel-loader!../../../myVue/node_modules/vue-loader/lib/selector?type=script&index=0!./Device.vue in ../src/components/views/Device.vue
* !!babel-loader!../../../myVue/node_modules/vue-loader/lib/selector?type=script&index=0!./Messagegt.vue in ../src/components/views/Messagegt.vue
* !!babel-loader!../../../myVue/node_modules/vue-loader/lib/selector?type=script&index=0!./Monitor.vue in ../src/components/views/Monitor.vue
* !!babel-loader!../../../myVue/node_modules/vue-loader/lib/selector?type=script&index=0!./Firewall.vue in ../src/components/views/Firewall.vue
* !!babel-loader!../../../myVue/node_modules/vue-loader/lib/selector?type=script&index=0!./Performance.vue in ../src/components/views/Performance.vue
* !!vue-style-loader!css-loader?{"minimize":false,"sourceMap":false}!../../myVue/node_modules/vue-loader/lib/style-compiler/index?{"id":"data-v-44394314","scoped":false,"hasInlineConfig":false}!../../myVue/node_modules/vue-loader/lib/selector?type=styles&index=0!./Dash.vue in ../src/components/Dash.vue
* !!vue-style-loader!css-loader?{"minimize":false,"sourceMap":false}!../../myVue/node_modules/vue-loader/lib/style-compiler/index?{"id":"data-v-1db248d7","scoped":false,"hasInlineConfig":false}!../../myVue/node_modules/vue-loader/lib/selector?type=styles&index=0!./Login.vue in ../src/components/Login.vue
* !!vue-style-loader!css-loader?{"minimize":false,"sourceMap":false}!../../myVue/node_modules/vue-loader/lib/style-compiler/index?{"id":"data-v-808c2e74","scoped":false,"hasInlineConfig":false}!../../myVue/node_modules/vue-loader/lib/selector?type=styles&index=0!./404.vue in ../src/components/404.vue
* vue-hot-reload-api in ../src/components/App.vue, ../src/components/Dash.vue and 16 others
To install them, you can run: npm install --save vue vue-router vuex-router-sync es6-promise/auto vuex !!babel-loader!../../myVue/node_modules/vue-loader/lib/selector?type=script&index=0!./App.vue !!babel-loader!../../myVue/node_modules/vue-loader/lib/selector?type=script&index=0!./Dash.vue !!babel-loader!../../myVue/node_modules/vue-loader/lib/selector?type=script&index=0!./Login.vue !!babel-loader!../../myVue/node_modules/vue-loader/lib/selector?type=script&index=0!./404.vue !!babel-loader!../../../myVue/node_modules/vue-loader/lib/selector?type=script&index=0!./Device.vue !!babel-loader!../../../myVue/node_modules/vue-loader/lib/selector?type=script&index=0!./Messagegt.vue !!babel-loader!../../../myVue/node_modules/vue-loader/lib/selector?type=script&index=0!./Monitor.vue !!babel-loader!../../../myVue/node_modules/vue-loader/lib/selector?type=script&index=0!./Firewall.vue !!babel-loader!../../../myVue/node_modules/vue-loader/lib/selector?type=script&index=0!./Performance.vue !!vue-style-loader!css-loader?{"minimize":false,"sourceMap":false}!../../myVue/node_modules/vue-loader/lib/style-compiler/index?{"id":"data-v-44394314","scoped":false,"hasInlineConfig":false}!../../myVue/node_modules/vue-loader/lib/selector?type=styles&index=0!./Dash.vue !!vue-style-loader!css-loader?{"minimize":false,"sourceMap":false}!../../myVue/node_modules/vue-loader/lib/style-compiler/index?{"id":"data-v-1db248d7","scoped":false,"hasInlineConfig":false}!../../myVue/node_modules/vue-loader/lib/selector?type=styles&index=0!./Login.vue !!vue-style-loader!css-loader?{"minimize":false,"sourceMap":false}!../../myVue/node_modules/vue-loader/lib/style-compiler/index?{"id":"data-v-808c2e74","scoped":false,"hasInlineConfig":false}!../../myVue/node_modules/vue-loader/lib/selector?type=styles&index=0!./404.vue vue-hot-reload-api
> Listening at http://localhost:8080
我该如何更改Vue的源代码路径?
请帮帮我。