Created
December 3, 2017 08:08
-
-
Save volgorean/3ed803f26ffc62b886fcc9f093264447 to your computer and use it in GitHub Desktop.
Example vue.js app setup without webpack
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
new Vue({ | |
el: "#app", | |
new Router({ | |
mode: "history", | |
routes: [ | |
{ path: "/", component: httpVueLoader("components/dash.vue") } | |
] | |
}) | |
}); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>whatever you put in head</title> | |
<link rel="stylesheet" type="text/css" href="css/styles-outside-components-still-work.css"> | |
</head> | |
<body> | |
<div id="app"> | |
<router-view></router-view> | |
</div> | |
<script src="js/vue.js"></script> | |
<script src="js/vue-router.js"></script> | |
<script src="js/vue-http-loader.js"></script> | |
<script src="js/app.js"></script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
vue-http-loader being referenced. Note that if you choose to include it then you will need to "serve" your files rather than navigating to the index.html file directly in your browser when developing locally as most browsers will prevent your js requiring the components dynamically otherwise.