You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
@rollup/plugin-terser incompatible with Node JS 14.x #1871
The docs for Terser suggest that the minimal version of Node required is 14.x. However, beginning with Terser v.0.4.3, the following error occurs:
[!] (plugin terser) TypeError: sources.at is not a function
at file:///___/node_modules/smob/src/module.ts:193:39
at Object.renderChunk (file:///___/node_modules/@rollup/plugin-terser/dist/es/index.js:172:30)
at /___/node_modules/rollup/dist/shared/rollup.js:1914:40
This is because smob@1.0.0 is using Array.at which wasn't added to node until 16.x
For others encountering this issue, I found that downgrading @rollup/plugin-terser to 0.4.2 resolves the error and appears to work as expected.
I DO think the documentation should be updated, as Node 14 will not work out of the box with this plugin in versions beyond 0.4.2
Activity