Skip to content

Does not support dependencies that depend on core-js@3 #2046

@hq001

Description

@hq001

Bug report

Steps to reproduce

If I use the following configuration it won't compile.
Core-js@3 is already installed in the package I depend on, but it still prompts me that I cannot find the corresponding core-js module. I tried to change core-js to a top-level dependency, but some modules were not found. I found out that this was caused by the core-js version. I guess it is because vuepress has some problems when parsing the module.

Another point is that it is possible to optimize the logs of the vuepress build docs. I found that if there is no module found, all the logs of webpack will be output.

{
  "presets": [
    [
      "@babel/preset-env",
      {
        "useBuiltIns": "usage",
        "corejs": {
          "version": 3,
          "proposals": true
        }
      }
    ]
  ]
}

I changed the version of core-js to 2 to compile successfully. Is this a vuepress issue? I use vuepress build docs

Other relevant information

https://github.com/zloirock/core-js/blob/master/docs/2019-03-19-core-js-3-babel-and-a-look-into-the-future.md

  • Output of npx vuepress info in my VuePress project:
Environment Info:

  System:
    OS: Windows 10
    CPU: (4) x64 Intel(R) Core(TM) i3-2120 CPU @ 3.30GHz
  Binaries:
    Node: 12.13.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.17.3 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 6.12.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 44.18362.449.0
  npmPackages:
    @vuepress/core: Not Found
    @vuepress/theme-default: Not Found
    vuepress: 1.2.0 => 1.2.0
  npmGlobalPackages:
    vuepress: Not Found

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions