-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Unsupported operation: 'Uri.base' is not supported #2240
Comments
Cannot reproduce using the provided snippets - also, this seems to be a purely upstream issue. |
@Justinidlerz var dartNodePreambleSelf = typeof global !== "undefined" ? global : window;
var self = Object.create(dartNodePreambleSelf);
Primitives_currentUri: function() {
if (!!self.location)
return self.location.href;
return null;
},
Uri_base: function() {
debugger
var uri = H.Primitives_currentUri();
if (uri != null)
return P.Uri_parse(uri);
throw H.wrapException(P.UnsupportedError$("'Uri.base' is not supported"));
}, So, you must add export default {
props: ['ctx'],
created () {
global.location = {
href: this.ctx.request.url
}
}
} it can be render succeed with combine |
This issue has been locked since it has been closed for more than 14 days. If you have found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest Vite version. If you have any other comments you should join the chat at Vite Land or create a new discussion. |
Describe the bug
Dart sass block
createServer().ssrLoadModule()
;Using
sass
inssrLoadModule
will throw error:Seems the bug is triggered by this one: dart-lang/sdk#27979
Reproduction
Create an Scss file
test-module.scss
Create an entry file:
index.ts
Then get the error.
System Info
vite
version: 2.0.3The text was updated successfully, but these errors were encountered: