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
The latest build breaks when it is imported into esm module with following error
[vite-plugin-windicss:devtools] Could not load /@windicss/devtools (imported by src/routes/index.svelte): __dirname is not defined
> Could not load /@windicss/devtools (imported by src/routes/index.svelte): __dirname is not defined
ReferenceError: Could not load /@windicss/devtools (imported by src/routes/index.svelte): __dirname is not defined
at Object.load (file:///Volumes/common/temp/node_modules/.pnpm/vite-plugin-windicss@1.4.7_typescript@4.4.3/node_modules/vite-plugin-windicss/dist/index.mjs:210:56)
at /Volumes/common/temp/node_modules/.pnpm/rollup@2.57.0/node_modules/rollup/dist/shared/rollup.js:22620:25
at processTicksAndRejections (node:internal/process/task_queues:96:5)
This is because __dirname is used by devtools which is now deprecated for esm modules by node
Minimal Reproductions
Versions
vite-plugin-windicss: v1.4.7
vite: v2.5.10
framework(vue/react/svelte/etc): svelte
Additonal Context
I am raising a PR to fix this issue.
The text was updated successfully, but these errors were encountered:
* fix(241): makes devtools esm compatible by addressing reference to depeprecated __dirname global variable
* chore: update
Co-authored-by: Bhavin <bhavinkamani@gmail.com>
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
Describe the bug
The latest build breaks when it is imported into
esm
module with following errorThis is because
__dirname
is used by devtools which is now deprecated foresm
modules by nodeMinimal Reproductions
Versions
Additonal Context
I am raising a PR to fix this issue.
The text was updated successfully, but these errors were encountered: