4 ms·
Any suggestions for running a Vue.js application as a local set of files, without running a web server? My use case is slightly more obscure than this, but imag
by tjr 7y ago
Any suggestions for running a Vue.js application as a local set of files, without running a web server? My use case is slightly more obscure than this, but imagine something like a local, off-network kiosk interface.
- fimdomeio 7y agoI guess this is an awful way to do it, but I heard stories about people that got away with a script that did and find and replace on build files to set some crazy paths.
- altec3 7y agoI've run vue apps just as local files. you'll run into cors issues with certain resources, but other than that it works pretty well.
- revvx 7y agoYou mean running production frontend-only apps? You can just open "index.html" in your browser and it will run fine, as longs as the paths inside your files are relative. You might have to reconfigure your bundler. If you're using Parcel, just pass `--public-url .` as a command line option when building. For Webpack use the publicPath configuration, etc. But remember that pages accessed via file:/// have limited permissions: you can't use localStorage, access some sites using CORS, can't capture audio/video, etc. But if you're not using these things then it's fine.