-
-
Notifications
You must be signed in to change notification settings - Fork 8k
isSelfAccepting of undefined in Vite 2.9.7 SSR #7992
Copy link
Copy link
Closed
Labels
Description
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
System:
OS: macOS 11.4
CPU: (8) x64 Apple M1
Memory: 26.97 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.5.0 - ~/.nvm/versions/node/v16.5.0/bin/node
Yarn: 1.22.15 - ~/.yarn/bin/yarn
npm: 7.19.1 - ~/.nvm/versions/node/v16.5.0/bin/npm
Browsers:
Brave Browser: 97.1.34.80
Chrome: 100.0.4896.127
Safari: 14.1.1Used Package Manager
npm
Logs
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 '
}Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- 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.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable