-
Notifications
You must be signed in to change notification settings - Fork 158
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
Configure build output folder structure #814
Comments
What tool are you using to bundle the safari extension with the native app? I've used Apple's |
What tool are you using to include the safari extension with the native app? I've used Apple's |
I'm using the |
https://react-native-safari-extension.vercel.app/extension-files
I'll consider it, but I think you should start writing a script to move all the files and update the manifest. That will be the best solution for the short-term. |
Would you consider integrating For reference, here is an example of a project that integrates Polar in their issues, and screenshot below: |
I might consider adding it, but that won't change my mind on this issue in particular. Even if someone were to come in and implement this, it would be on me to maintain it going forward, and this doesn't seem useful enough to me. Could you share more of why you're using WXT in the first place? It seems like Is there not a way to tell it to use an already built folder instead? |
The DX of WXT is extremely good for multi-browser extension development, and it's better maintained and more mature. The suggested workflow of
Well that's essentially what I'm doing now to get it to work (although there's still problems that I haven't looked into yet). I'm just taking the build output of WXT, transforming some paths, and letting |
Oh I see, sorry. For some reason I talked myself into thinking that you're reusing your react-native code for the popup, but really you're just shipping a separate extension alongside a desktop app. I see. So, yeah, it makes sense why you'd want to use WXT. Hmmmmmmmmmmmmm... Ok, I'll see what I can do. There are 4 places that dictate "where" files are output to.
Then there's all the places that WXT "assumes" a specific output structure... While I've tried to make non-user facing, internal values like this reference internal constants, the output structure is specifically something I decided to not store constants for, since it's complex and touchy, with the assumption that I would not allow customizing it... So even if we allow configuring those 4 places where the output structure is dictated, there's probably a lot of code that will have to be updated.
So those are most of the problems I can think of. Let me spike it out and see how bad it is, and the amount of complexity for a feature like this. |
That would be legendary. 🙏 (and ofc happy to make a donation for this if something like buymeacoffee or polar.sh is set up!) |
Feature Request
It would be great to have options to configure the folder structure of the build output via
wxt.config.ts
. For instance, I'd like to specify that built code gets output tobuild/src/*
, instead of the current output into the top-level: [build/chunks/*
,build/content-scripts/*
,build/background.js
,popup.html
, ...]Is your feature request related to a bug?
N/A
What are the alternatives?
The alternative is that I write a script that transforms the build output into my desired structure. From some simple manual testing, I think I can just move the build files into my desired folder,
src/
, and prependsrc/
to the appropriate paths specified inmanifest.json
andpopup.html
.But in general, I think this is a useful option to expose. I think it may also be easier to accomplish and less fragile if supported on the
wxt
side.Additional context
I'm building an iOS Safari extension in Expo, and the library I'm using to roll the extension into the iOS app only accepts this specific folder structure (it's the
react-native-safari-extension
Expo plugin):The text was updated successfully, but these errors were encountered: