jy0529 / vite-plugin-dynamic-publicpath

Use dynamic import handler to change runtime public base path, like webpack's __webpack_public_path__.
MIT License
46 stars 10 forks source link

build error vite 2.8.0 error #12

Open cuing opened 2 years ago

cuing commented 2 years ago

vite 2.8.0 use 「useDynamicPublicPath」plugin,build with error:

error during build: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined at validateString (internal/validators.js:124:11) at Object.basename (path.js:1156:5) at Object.generateBundle (/Users/****/node_modules/vite/dist/node/chunks/dep-c9c9d3e5.js:29846:56) at /Users/****/node_modules/rollup/dist/shared/rollup.js:22681:25 at processTicksAndRejections (internal/process/task_queues.js:93:5)

without 「useDynamicPublicPath」,build is ok。

jy0529 commented 2 years ago

can you support a reproduce demo ? I try to upgrade vite2.8 in examples, it's run ok.