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

fix #1708 prioritise vuepress dependencies over cwd node_modules #1720

Merged
merged 1 commit into from
Jul 28, 2019

Conversation

ColinKinloch
Copy link
Contributor

Summary

Have webpack prioritise the use of vuepress dependencies over the working directories node_modules.

Fixes #1708

Currently if vuepress is used to generate docs for a project depending on the latest version of css-loader yarn vuepress dev docs serves a blank screen.

If package.json resembles this:

{
  "scripts": {
    "docs:dev": "vuepress dev docs"
  },
  "dependencies": {
    "vuepress": "^1.0.2",
    "css-loader": "^3.1.0"
  }
}

vuepress will serve a blank page with the error:

ValidationError: Invalid options object. CSS Loader has been initialised using an options object that does not match the API schema.
 - options has an unknown property 'exportOnlyLocals'. These properties are valid:

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Other, please describe:

If changing the UI of default theme, please provide the before/after screenshot:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

It will be more difficult to overwrite the versions of packages vuepress depends on.

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)

You have tested in the following browsers: (Providing a detailed version will be better.)

  • Chrome
  • Firefox
  • Safari
  • Edge
  • IE

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature
  • Related documents have been updated
  • Related tests have been updated

To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

This will make the instruction on the front page of https://vuepress.vuejs.org/ more likely to work on an existing project.

@ulivz ulivz merged commit 52f421b into vuejs:master Jul 28, 2019
@vue-bot
Copy link

vue-bot commented Jul 28, 2019

Hey @ColinKinloch, thank you for your time and effort spent on this PR, contributions like yours help make Vue better for everyone. Cheers! 💚

@tychenjiajun
Copy link

@ColinKinloch @ulivz Is this PR introduced issue #1729 ?

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

Successfully merging this pull request may close these issues.

4 participants