parcel打包vue

新建文件夹parcel-vue

yarn init -y //初始化package.json

安装依赖

yarn add vue parcel-bundler vue-template-compiler

新建index.html

//index.html




    
    
    
    Document


    

新建文件夹src,src下新建index.js、app.vue

//index.js

import Vue from 'vue'
import App from './app.vue'

new Vue({
    el: '#root',
    render: h => h(App)
})
//app.vue




使用parcel打包

parcel index.html

你可能感兴趣的:(vue.js,parcel)