We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
cts cjs .cts .cjs
https://github.com/PythonCoderAS/typescript-bug-repro
File config.ts:
config.ts
import { resolve } from "path"; const config = resolve(__dirname, "config.cts") module.exports = config;
config.cjs:
config.cjs
import { resolve } from "path"; const config = resolve(__dirname, "config.cts"); module.exports = config; //# sourceMappingURL=config.cjs.map
const { resolve } = require("path"); const config = resolve(__dirname, "config.cts"); module.exports = config; //# sourceMappingURL=config.cjs.map
This is correct because cjs files cannot use ESM things like import.
This might be an error to use but it should throw an error instead of failing silently.
The text was updated successfully, but these errors were encountered:
Duplicate #50647
Sorry, something went wrong.
This issue has been marked as "Duplicate" and has seen no recent activity. It has been automatically closed for house-keeping purposes.
No branches or pull requests
π Search Terms
cts
cjs
.cts
.cjs
π Version & Regression Information
β― Playground Link
https://github.com/PythonCoderAS/typescript-bug-repro
π» Code
File
config.ts
:π Actual behavior
config.cjs
:π Expected behavior
This is correct because cjs files cannot use ESM things like import.
Additional information about the issue
This might be an error to use but it should throw an error instead of failing silently.
The text was updated successfully, but these errors were encountered: