Skip to content

migration cli uses absolute paths instead of relative paths for customCss and sidebarPath #3239

@darshkpatel

Description

@darshkpatel

🐛 Bug Report

The migration CLI uses absolute paths instead of relative paths for customCss and sidebarPath
Discovered while working on MLH-Fellowship/react-native-website#37

Have you read the Contributing Guidelines on issues?

yes

To Reproduce

  1. Create a v1 site npx docusaurus-init
  2. Use the migration CLI for migrating a website from v1 to v2 docusaurus-migrate migrate website website-v2
  3. Open website-v2/docusaurus.config.js
  4. Look for sidebarPath and customCss

Expected behavior

The paths should be relative / should use require.resolve()

Actual Behavior

Absolute paths are written in docusaurus.config.js

Your Environment

  • @docusaurus/migrate 2.0.0-alpha.59
  • Environment name and version: macOS Catalina

Example Repo

https://github.com/darshkpatel/docusaurus-migrationcli-bug

Lines:
https://github.com/darshkpatel/docusaurus-migrationcli-bug/blob/768810e484cd0ccbb21fd33656e74ba944ccf654/website-v2/docusaurus.config.js#L32-L38

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error in the Docusaurus core causing instability or issues with its executiongood first issueIf you are just getting started with Docusaurus, this issue should be a good place to begin.help wantedAsking for outside help and/or contributions to this particular issue or PR.mlhMajor League Hacking Fellowship

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions