Home
Support Forums

Esm / es modules / "type": "module" in build plugins?

Hello!

I’m writing a build plugin. May I use "type": "module" in package json and then do

export async function onSuccess({ netlifyConfig, inputs, utils }) {
  // ...
}

in my script file?

I haven’t tested this personally, but as long as Node.js is able to execute it correctly, I’d assume it would work. If not, let us know.