M
M
Maxim Sholomov2019-06-03 07:38:27
Vue.js
Maxim Sholomov, 2019-06-03 07:38:27

How to generate a Nuxt.js project so that it opens locally by file uri?

Hey!
nuxt generate collects all image styles and scripts and the page is opened locally (file uri) - we get a page without images and scripts. Okay, let's edit paths to images and scripts /_nuxt to ./_nuxt images appear, but scripts don't work.
If you open it via the http protocol, for example, by running a web server in the site folder (cd ~/nuxt/dist; php -S localhost:8000), then the scripts are loaded and everything works fine.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question