-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Bug: @motionone/solid
causing an error
#7575
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
Comments
@DeMoorJasper, by any chance, do you know what's going on here? |
Strange, also don't find any reference to _standard, seems like some babel stuff is failing to load at first look, but will dig deeper into it later today |
Seems related to a bug in solid-refresh on all versions below |
Seems like the latest version has another issue For now I'll work around it by filtering out refresh plugins for node modules |
Hey, @davedbase. We encountered a bug on solid-refresh, which can be reproduced on the repo mentioned above. Thanks |
@danilowoz Hi, I'm the one working on solid-refresh. May I ask what bundler setup are you using? |
Maybe @DeMoorJasper can clarify our current bundler setup |
Hi folks, we're getting a lot of flack from the broader Solid ecosystem on this topic. It's really hampering the perspective of Solid as a maintained ecosystem. I'm really apologetic to ask once again but we could really use support to solve this. Thank you. |
@davedbase there's a repro in this thread that reproduces it consistently even locally, let me know if you need any more help
|
Hmm Okay I revisited this again. The specific babel setup is kinda wonky. There are parts where it works as intended (the automatic import for the edit: var Presence = (0, _solidRefresh.$$component)(_REGISTRY, "Presence", function (props) {
// ...
var MotionComponent = _$$component(_REGISTRY, "MotionComponent", function (props) { I can safely say that this is either a preset bug or a bug in Babel itself. Either way, I would recommend not using preset-env/transform-commonjs-modules and use other transpiling tool instead (maybe ESBuild) edit 2: // Input
function Example() {
} "use strict";
var _solidRefresh = require("solid-refresh");
var _REGISTRY = (0, _solidRefresh.$$registry)();
var Example = (0, _solidRefresh.$$component)(_REGISTRY, "Example", function Example() {}, {
location: "index.js:1:0"
});
if (module.hot) {
(0, _solidRefresh.$$refresh)("standard", module.hot, _REGISTRY);
} Afterwards it just fails when there's multiple components defined: // Input
function Foo() {
}
function Bar() {
}
function Baz() {
} "use strict";
var _solidRefresh = require("solid-refresh");
var _REGISTRY = (0, _solidRefresh.$$registry)();
var Foo = (0, _solidRefresh.$$component)(_REGISTRY, "Foo", function Foo() {}, {
location: "index.js:1:0"
});
var Bar = _$$component(_REGISTRY, "Bar", function Bar() {}, {
location: "index.js:4:0"
});
var Baz = _$$component(_REGISTRY, "Baz", function Baz() {}, {
location: "index.js:7:0"
});
if (module.hot) {
(0, _solidRefresh.$$refresh)("standard", module.hot, _REGISTRY);
} Take note that I've tried fixing this in the plugin myself but to no avail. I'm convinced that the preset-env/transform-modules-commonjs is the issue. |
🐛 bug report
Solid.js templates using
@motionone/solid
is throwing an error when trying to load it. Currently, this template has been used on motion.dev documentation, which is failing due to the following error:Debugging
I can see that this error is coming from a
@motionone/solid
. However, I couldn't find the_standard
function on the original source code, so I guess it's an issue on our evaluation function, which is not including that function.Link to sandbox: link (optional)
You can run it here: https://codesandbox.io/s/sandpack-project-forked-ovjfhc?file=/package.json:132-148
The text was updated successfully, but these errors were encountered: