aui / art-template

High performance JavaScript templating engine
https://aui.github.io/art-template/
MIT License
9.86k stars 2.67k forks source link

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

Open turbobuilt opened 1 year ago

turbobuilt commented 1 year ago

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 commented 1 year ago

这里是付剑伟您的来信已收到我会尽快给您回复 

turbobuilt commented 1 year ago

Great! I opened a bug on bun as well. Bun is so easy to use but still a little buggy. https://github.com/oven-sh/bun/issues/3375Sent from my iPhoneOn Jul 18, 2023, at 9:52 PM, 付剑伟 @.***> wrote: 这里是付剑伟您的来信已收到我会尽快给您回复 

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>