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
Load content script as string with esbuild plugin #240
Load content script as string with esbuild plugin #240
Conversation
Socket Security Pull Request Report👍 No new dependency issues detected in pull request Pull request report summary
Bot CommandsTo ignore an alert, reply with a comment starting with Powered by socket.dev |
b746da9
to
57a861d
Compare
This is interesting work, and we're looking at it. @yannbf will redo the PR that this is based on, so we can target that as a base here, to only include the actual changes. |
Great! I changed the base now. |
4cbe11b
to
a9fd4fd
Compare
57a861d
to
9a9ffe4
Compare
Codecov ReportBase: 76.13% // Head: 76.13% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## bundle-tsup-swc #240 +/- ##
================================================
Coverage 76.13% 76.13%
================================================
Files 11 11
Lines 176 176
Branches 36 36
================================================
Hits 134 134
Misses 42 42 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
I cleaned up some commits, should be good to go now. |
a561b1d
to
8afd5e6
Compare
This plugin builds on #250 and extracts the injected page content script to a separate ts file, which gets loaded by the custom script-to-file plugin in tsup.config.ts.
This is much cleaner, adds type safety and allows us to bundle other modules into the content script. Can replace #239.
I also added
kleur
for the terminal colors.In the built files, the
addContentScript
call looks as follows:📦 Published PR as canary version:
0.9.4--canary.240.4cbe11b.0
✨ Test out this PR locally via:
npm install @storybook/test-runner@0.9.4--canary.240.4cbe11b.0 # or yarn add @storybook/test-runner@0.9.4--canary.240.4cbe11b.0