Skip to content
代码片段 群组 项目
提交 1e0507ad 编辑于 作者: Lukas Eipert's avatar Lukas Eipert
浏览文件

Fix imports for @swagger-api/apidom-reference

`@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.
上级 466c5c80
No related branches found
No related tags found
1 合并请求!2419Fix TanukiBot spec relying on outdated code
加载中
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册