-
-
Save egoist/5fabf27fed3c1761710fd101f282bb42 to your computer and use it in GitHub Desktop.
Created by gist-it (https://github.com/egoist/gist-it)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<h1>hello {{ data }}</h1> | |
</template> | |
<script> | |
export default { | |
data() { | |
return {data: 'foo!!'} | |
} | |
} | |
</script> | |
<style> | |
h1 { | |
color: magenta; | |
} | |
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>app</title> | |
</head> | |
<body> | |
<div id="app"></div> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from 'vue' | |
import App from './App.vue' | |
new Vue({ | |
el: '#app', | |
render: h => h(App) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"dependencies": { | |
"vue": "^2.3.4" | |
}, | |
"devDependencies": { | |
"babel-core": "^6.25.0", | |
"babel-loader": "^7.1.1", | |
"babel-preset-es2015": "^6.24.1", | |
"css-loader": "^0.28.4", | |
"html-webpack-plugin": "^2.29.0", | |
"vue-loader": "^13.0.0", | |
"vue-template-compiler": "^2.3.4", | |
"webpack": "^2.6.0", | |
"webpack-dev-server": "^2.5.0" | |
}, | |
"scripts": { | |
"dev": "webpack-dev-server --hot --inline --config webpack.config.js", | |
"upload": "gist-it *.vue *.js *.json *.html" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path') | |
const HTMLPlugin = require('html-webpack-plugin') | |
module.exports = { | |
entry: './index.js', | |
output: { | |
path: __dirname, | |
filename: 'main.js' | |
}, | |
module: { | |
rules: [{ | |
test: /\.js$/, | |
loader: 'babel-loader', | |
exclude: [/node_modules/], | |
options: { | |
presets: [ | |
['es2015', {modules: false}] | |
] | |
} | |
}, { | |
test: /\.vue$/, | |
loader: 'vue-loader' | |
}] | |
}, | |
plugins: [ | |
new HTMLPlugin({ | |
title: 'app', | |
template: path.join(__dirname, 'index.html') | |
}) | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment