TypeError: The "path" argument must be of type string. Received undefined
alvarotrigo opened this issue · comments
Álvaro commented
Getting this error:
[!] (plugin rollup-plugin-iife) TypeError: The "path" argument must be of type string. Received undefined
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
at validateString (internal/validators.js:124:11)
at Object.resolve (path.js:980:7)
at Object.renderChunk (/Users/myuser/Sites/repos/demo/node_modules/rollup-plugin-iife/index.js:50:29)
at /Users/myuser/Sites/repos/demos/node_modules/rollup/dist/shared/rollup.js:22620:25
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
I'm using it like this:
output: [
{
file: "build/demo.js",
name: "demo",
format: "umd",
globals: {
document: 'document',
window: 'window'
},
externals: ['document', 'window', 'Math'],
plugins: [iife()]
},
{
file: "build/demo.min.js",
name: "demo",
format: "umd",
plugins: [terser(terserOptions)],
globals: {
document: 'document',
window: 'window'
},
},
],
eight commented
This plugin converts esm into iife so you have to change format: "umd"
to format: "esm"
.
Álvaro commented
Ok thanks.