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

docs: Added Multi-Page App example using 'root' #2939

Merged
merged 4 commits into from
Apr 11, 2021

Conversation

TheVirtuoid
Copy link
Contributor

Description

Documentation change in the 'Building For Production' page, 'Multi-Page App' section:

When using the root option, it may not be clear to beginners that the root directory needs to be included within the resolve() function. Otherwise, running the build process will error out due to the HTML files not being found.

What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

When using the root option, it may not be clear to beginners that the root directory needs to be included within the resolve() function. Otherwise, the HTML files will not be found.
@Shinigami92 Shinigami92 added documentation Improvements or additions to documentation p1-chore Doesn't change code behavior (priority) labels Apr 10, 2021
docs/guide/build.md Outdated Show resolved Hide resolved
docs/guide/build.md Outdated Show resolved Hide resolved
@Shinigami92 Shinigami92 self-requested a review April 10, 2021 16:33
Shinigami92
Shinigami92 previously approved these changes Apr 10, 2021
Copy link
Member

@patak-dev patak-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking the time to improve the docs. In this particular case I don't know if we should add a full example, as it may distract the reader from the main content. Maybe we could just add a single line saying something like

If you specify a different root, remember that __dirname will still be the folder of your vite.config.js file when resolving the input paths

Removed examples, changed text.
@TheVirtuoid
Copy link
Contributor Author

@patak-js Thanks. I agree, we can remove the extra example. I have made that change, but added an extra sentence that gives a hint as to what a developer needs to change.

patak-dev
patak-dev previously approved these changes Apr 10, 2021
docs/guide/build.md Outdated Show resolved Hide resolved
@patak-dev patak-dev merged commit 1e3cd99 into vitejs:main Apr 11, 2021
@GGwujun GGwujun mentioned this pull request May 13, 2021
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation p1-chore Doesn't change code behavior (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants