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

use extension in relative imports #2292

Closed
jimmywarting opened this issue Oct 14, 2021 · 4 comments · Fixed by #2320
Closed

use extension in relative imports #2292

jimmywarting opened this issue Oct 14, 2021 · 4 comments · Fixed by #2320

Comments

@jimmywarting
Copy link
Contributor

import Http, { makeHttp, serializeRes, serializeHeaders } from './http';
import Resolver, { clearCache } from './resolver';
import resolveSubtree from './subtree-resolver';
import { makeApisTagOperation } from './interfaces';
import { execute, buildRequest, baseUrl } from './execute';
import { opId } from './helpers';

extension less is a bit non-esm ish way of doing things

@char0n
Copy link
Member

char0n commented Oct 15, 2021

@jimmywarting
Copy link
Contributor Author

I'm guess the only reason why this still work without extension is b/c you transpile it to cjs for compability?

@char0n
Copy link
Member

char0n commented Nov 2, 2021

@jimmywarting exactly, CJS is just one of the transpiled form. Mapping of build fragments is explicitly defined in package.json:

https://github.com/swagger-api/swagger-js/blob/master/package.json#L10

char0n pushed a commit that referenced this issue Nov 8, 2021
This is the new EMS way of doing things.

Closes #2292
@swagger-bot
Copy link
Contributor

🎉 This issue has been resolved in version 3.18.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants