-
Notifications
You must be signed in to change notification settings - Fork 664
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
fix: tailwind supports routes and islands provided by plugins #2266
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PTAL at my last suggestion regarding your DM query. deno_std
can be used, but it doesn't make a huge difference. Nor does this code make me think that there's a need for a new API in deno_std
.
I'm not really aware of the context behind this PR, so take my suggestions with a pinch of salt, but the code looks good to me 👍🏾
Thanks for the suggestions -- these look great. I'll incorporate these now and get this cleaned up some more. |
todo:
|
@iuioiua, as we discussed yesterday, I'm working the pluginification of saaskit using this PR. It's going well, except for your usage of Given that I want to get this done sooner rather than later, I'm trying to do the module resolution myself. Unfortunately I'm encountering denoland/vscode_deno#708 when trying to debug the project. So using |
Perhaps, try get this working for local plugins, where all the code for that plugin lies within that plugin's directory. Then, you might be able to just |
…from previous commit, switch to using importmap project for resolution
@marvinhagemeister @iuioiua, I think this is ready to look at. There's an uptake of this PR in denoland/saaskit#660. I've added a few different test cases to make sure that the different ways of adding routes via plugins are covered. (Most of the emphasis is on the module resolution code.) |
tests/fixture_tailwind_remote_classes/nestedPlugins/nested/nested/nested/veryNestedPlugin.ts
Outdated
Show resolved
Hide resolved
I'm not sure whether this should be merged until denoland/vscode_deno#708 is resolved. Otherwise I don't think people will be able to debug their apps. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry. Few things that I didn't realise earlier. Definitely looking better, though.
closes #2159
@mcgear, please take a look at this. I got my comment cleaned up a bit and it's working for my three test cases.
components
folder with a component, modified the tailwind config to not scan this folder, and then used this component within a route from the plugin. Without my changes, the text is unstyled; with my changes, it works as expected.tests/fixtures
, so everything was local.After hacking the two new properties into the plugin returned by
blogPlugin
, updating fresh to be my branch (i.e."$fresh/": "https://raw.githubusercontent.com/deer/fresh/2159_plugin_routes_tailwind/",
), and removing the safelist, this is also working.If you use this branch in your project, I'm curious to see if it works.
I haven't tested this with builds yet, and I know this is already going to fail in CI for some web assembly reason (at least on my computer). But I wanted to put this up since it's solving a pretty big problem with plugins.