Skip to content

Instantly share code, notes, and snippets.

@movii
Last active June 19, 2018 02:19
Show Gist options
  • Save movii/04f2b32881e3d64f0fd66b2d377dd0ed to your computer and use it in GitHub Desktop.
Save movii/04f2b32881e3d64f0fd66b2d377dd0ed to your computer and use it in GitHub Desktop.
配合 Vue.js 配置 Webpack。原文:https://moxo.io/blog/2016/09/10/npm-vue-webpack/
import Vue from 'vue';
import App from './App.vue'
- new Vue({
- el: '#app',
- template: `<h1>Hello World with webpack-dev-server</h1>`
- })
+ const app = new Vue({
+ render: h => h(App)
+ })
+ app.$mount('#app')
<template>
<h1>Hello World with webpack-dev-server</h1>
</template>
<script>
export default {
data () {
return {}
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment