-
Notifications
You must be signed in to change notification settings - Fork 676
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
When a directory is specified in the plugin's baseLocation, the last directory is removed from path #2068
Comments
Hi @hashrock, thanks for playing QA and testing this out. I'll do some more testing later today, but at first glance it looks like you're trying to import something from outside the project. That sounds like #1997. Separately, there's a discussion on the origin of the I'll think about this today, and do some testing tonight. |
Ok, it's not quite tonight, but I wanted to get more information about your use case. A plugin like this loads successfully: {
name: "asdf",
islands: {
baseLocation:
"https://raw.githubusercontent.com/hashrock/fresh-components-beta/main/components/",
paths: [
"components/Map.tsx",
],
}, But what are you planning on doing with this? The motivating use case for #1472 was the following: import IslandPluginComponent from "./sample_routes/PluginRouteWithIsland.tsx";
routes: [
{
path: "pluginroutewithisland",
component: IslandPluginComponent,
},
], and then import Island from "../../islands/Island.tsx";
import IslandFromPlugin from "../sample_islands/IslandFromPlugin.tsx";
export default function IslandPluginComponent() {
return (
<div>
<Island />
<IslandFromPlugin />
</div>
);
} Without being able to specify the island in the plugin like this:
the route using the island specified in Here it looks like you're trying to declare an island for your plugin with the source defined remotely. How do you plan on using the injected island? What does the plugin do? |
Thank you! I'm currently trying to implement a plugin that provides a UI (e.g. kv explorer or storybook alternative), and I wanted to use externally defined routes and islands by simply importing them. I originally thought |
Can this be solved with improved documentation? |
Yeah, It would be helpful if the documents or examples were expanded! |
@deer I'm sorry! I misunderstood the meaning of |
Ok, glad to hear. Just FYI, Marvin also improved the documentation a bit here: #2109 |
Currently, when a directory is specified in the plugin's baseLocation, it attempts to read a path with the last directory removed.
In the example, since
import.meta.url
is specified, I'm not sure if it's intended to specify a directory in the first place.cc: @deer
The text was updated successfully, but these errors were encountered: