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

Doesn't work with bun.js because require.extensions[template.defaults.extname] = extension; looks like it's not supported #649

Open
turbobuilt opened this issue Jul 18, 2023 · 2 comments

Comments

@turbobuilt
Copy link

Hi no speak chinese :)

Apparently this line of code is deprecated. It doesn't work with Bun.js. Is there a workaround? Thank you! This is a great library

const template = require('./lib/index');
const extension = require('./lib/extension');

template.extension = extension;
>>> require.extensions[template.defaults.extname] = extension;

module.exports = template;

TypeError: undefined is not an object (evaluating 'import.meta.require.extensions[template.defaults.extname] = extension')

@704585069
Copy link

704585069 commented Jul 18, 2023 via email

@turbobuilt
Copy link
Author

turbobuilt commented Jul 18, 2023 via email

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

No branches or pull requests

2 participants