Skip to content

Commit 5b52e5e

Browse files
committed
Add alias @
1 parent 2eb2107 commit 5b52e5e

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

dist/assets/js/app.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rollup.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import path from 'path'
12
import alias from 'rollup-plugin-alias'
23
import vue from 'rollup-plugin-vue'
34
import buble from 'rollup-plugin-buble'
@@ -11,7 +12,9 @@ import replace from 'rollup-plugin-replace'
1112

1213
let plugins = [
1314
alias({
14-
vue$: 'vue/dist/vue.common.js'
15+
vue$: 'vue/dist/vue.common.js',
16+
'@': path.resolve('./src/'),
17+
resolve: ['.js', '.vue']
1518
}),
1619
vue({
1720
css: './dist/assets/css/app.css'

src/app.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import Vue from 'vue'
2-
import Clock from './components/Clock.vue'
1+
import Vue from 'vue';
2+
import Clock from '@/components/Clock.vue';
33

44
const app = new Vue({
55
el: '#app',
66
components: {
7-
Clock
8-
}
9-
})
7+
Clock,
8+
},
9+
});

0 commit comments

Comments
 (0)