Skip to content
代码片段 群组 项目
  • Lukas Eipert's avatar
    1e0507ad
    Fix imports for @swagger-api/apidom-reference · 1e0507ad
    Lukas Eipert 创作于
    `@swagger-api/apidom-reference` makes use of the `exports` field in
    `package.json`. This is a ESM/nodeJS specific spec, defined here:
    https://nodejs.org/docs/latest-v18.x/api/packages.html#exports
    
    It allows defining entrypoints for ESM packages. Webpack 4 doesn't
    support this part of the ESM spec, while Webpack 5 and Vite support it
    properly. It doesn't pose a problem usually, until the package starts
    using the defined entrypoints itself.
    
    The package `@swagger-api/apidom-reference` started to rely on it
    internally. So Vite handles it fine, but webpack needed some custom
    aliases. These aliases are used in vite as well, and broke vite.
    
    Instead of relying on aliases this implements a webpack 4 plugin which
    replaces the custom entry points with a proper link to the file. I
    really cannot wait for vite to replace webpack, so that we can get rid
    of this tech debt.
    1e0507ad
    历史
    Fix imports for @swagger-api/apidom-reference
    Lukas Eipert 创作于
    `@swagger-api/apidom-reference` makes use of the `exports` field in
    `package.json`. This is a ESM/nodeJS specific spec, defined here:
    https://nodejs.org/docs/latest-v18.x/api/packages.html#exports
    
    It allows defining entrypoints for ESM packages. Webpack 4 doesn't
    support this part of the ESM spec, while Webpack 5 and Vite support it
    properly. It doesn't pose a problem usually, until the package starts
    using the defined entrypoints itself.
    
    The package `@swagger-api/apidom-reference` started to rely on it
    internally. So Vite handles it fine, but webpack needed some custom
    aliases. These aliases are used in vite as well, and broke vite.
    
    Instead of relying on aliases this implements a webpack 4 plugin which
    replaces the custom entry points with a proper link to the file. I
    really cannot wait for vite to replace webpack, so that we can get rid
    of this tech debt.
代码所有者
将用户和群组指定为特定文件更改的核准人。 了解更多。