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
After 2.9.7, Vite started throwing isSelfAccepting of undefined error.
It seems to happen specifically in the case where we pass inlined css through vite.transformIndexHtml.
Also, before facing this issue, I am also facing #6859 (comment) (which I fixed by adding a random file name to "main" property of package.json (seem hacky))
So this issue could be a side-effect of that issue.
TypeError: Cannot set properties of undefined (setting 'isSelfAccepting')
at TransformContext.transform (/home/projects/github-12zodn-gvvydc/node_modules/vite/dist/node/chunks/dep-88bd5805.js:56775:48)
at async Object.transform (/home/projects/github-12zodn-gvvydc/node_modules/vite/dist/node/chunks/dep-88bd5805.js:38911:30)
at async eval (/home/projects/github-12zodn-gvvydc/node_modules/vite/dist/node/chunks/dep-88bd5805.js:56245:24)
at async Promise.all (index 0)
at async devHtmlHook (/home/projects/github-12zodn-gvvydc/node_modules/vite/dist/node/chunks/dep-88bd5805.js:56240:5)
at async applyHtmlTransforms (/home/projects/github-12zodn-gvvydc/node_modules/vite/dist/node/chunks/dep-88bd5805.js:29471:21)
at async eval (/home/projects/github-12zodn-gvvydc/server.js:46:18) {
plugin: 'vite:import-analysis',
id: '/home/projects/github-12zodn-gvvydc?html-proxy&0.css',
pluginCode: '\n body {\n background-color: red;\n }\n '
}
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
Adding a if (importerModule) fixed the issue however there is this comment on the line above which I am not sure if stands true in my case since it does happen to be undefined-
Describe the bug
After 2.9.7, Vite started throwing
isSelfAccepting
of undefined error.It seems to happen specifically in the case where we pass inlined css through
vite.transformIndexHtml
.Also, before facing this issue, I am also facing #6859 (comment) (which I fixed by adding a random file name to "main" property of package.json (seem hacky))
So this issue could be a side-effect of that issue.
Reproduction
https://stackblitz.com/edit/github-12zodn-gvvydc?file=server.js&terminal=dev
System Info
Used Package Manager
npm
Logs
Validations
The text was updated successfully, but these errors were encountered: