Closed sapphi-red closed 1 year ago
Can we directly create the require
function in place? I am not sure the shim is needed
I forgot that tsup will shim import.meta.url. (I had to add esbuildOptions.supported
though)
I updated the PR.
import-meta
not supported error was happening because the target was ES2017
.
Because vite-plugin-vue-markdown
depends on Vite 2+ that supports Node 12+, I changed the target to node12
instead of setting esbuildOptions.supported
in the latest commit. node12
is ES2019
+ some features according to https://node.green/ .
Sorry, #18 wasn't working because
require
doesn't work in ESM. This PR shimrequire
for ESM.