This sample demonstrates way to load Vue components with RequireJS
Run bower install
This will download necessary libraries into bower_components
.
Due to browser's XMLHttpRequest CSRF limitations use a local server to serve files from current directory, for example with Python built-in module:
python -m SimpleHTTPServer 8008 & open http://localhost:8008/index.html
To create production-ready js bundle we suggest to use r.js optimizer.
-
Install r.js optimizer:
npm install -g requirejs
-
Make
app.dist.js
by callingr.js -o app.build.js
The combined and minified bundle will be generated for standalone usage.
-
And then simply open
app.dist.html
.
Note: currently Vue-component's styles will omitted during build – use standard css instead.