Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with Docs build process #151

Open
acespace90 opened this issue Feb 24, 2021 · 1 comment
Open

Problem with Docs build process #151

acespace90 opened this issue Feb 24, 2021 · 1 comment

Comments

@acespace90
Copy link

Version: 10.6.0

Hi I launched the yarn build command, it generates the dist folder but when I upload on the server nothing happens.
It only works in local if I run npx http-server dist as the guide here explains.

I discovered two things:

  • All static assets in index.html files appears like so
<script src=/js/chunk-vendors.4e5716f4.js></script>

without the double quote and mistakenly pointing to the file.
It should appear like so instead

<script src="./js/chunk-vendors.4e5716f4.js"></script>
  • Same error occurs into /js/app.js file when fetching tree.json file
    it should be like so
fetch("./assets/tree.json");

Obviously, these manual changes must be made every time you build the app resulting in a tedious job.

What am I wrong?

Thanks in advice

@roperzh
Copy link
Member

roperzh commented Feb 24, 2021

Hi @acespace90!

without the double quote and mistakenly pointing to the file.

This is not managed by Diez directly (DocsGen its a Vue app built by the Vue CLI itself). Don't worry about the attributes being unquoted they are valid in this case.

Obviously, these manual changes must be made every time you build the app resulting in a tedious job.

The file paths are relative file paths, in this case the build is expecting to find the files at the root of your website.

For example if your website is https://example.com, the browser will look for the files at https://example.com/js/chunk-vendors.4e5716f4.js and https://example.com/assets/tree.json.

You can fix this by deploying your files to the expected path.

Having said that, we should really:

Does this answer your question?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants