Skip to content

Instantly share code, notes, and snippets.

@RedHatter
Last active August 12, 2017 20:35
Show Gist options
  • Save RedHatter/8eadc65bd5f8327f26dcfd10a7bf3dad to your computer and use it in GitHub Desktop.
Save RedHatter/8eadc65bd5f8327f26dcfd10a7bf3dad to your computer and use it in GitHub Desktop.
<template>
<div>test</div>
</template>
const Vue = require('vue/dist/vue.common.js')
let app = new Vue({
el: '#mount',
components: {
Child: require('./child.vue')
}
})
<html>
<head>
<title>Vue Test</title>
</head>
<body>
<div id="mount">
<child></child>
</div>
<script src="bundle.js"></script>
</body>
</html>
{
"name": "vue-webpack-test",
"version": "1.0.0",
"description": "Simpilest Vue.js Webpack configuration.",
"dependencies": {
"css-loader": "^0.28.4",
"vue": "^2.4.2",
"vue-loader": "^13.0.4",
"vue-template-compiler": "^2.4.2",
"webpack": "^3.5.4"
},
"scripts": {
"compile": "webpack"
},
"author": "Timothy Johnson",
"license": "GPL-3.0"
}
module.exports = {
entry: __dirname + '/display.js',
output: {
filename: 'bundle.js'
},
module: {
rules: [ { test: /\.vue$/, loader: 'vue-loader' } ]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment