Skip to content
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

feat: ESM content script support #406

Closed
wants to merge 5 commits into from
Closed

Conversation

aklinker1
Copy link
Collaborator

@aklinker1 aklinker1 commented Feb 3, 2024

This PR likely won't be merged, this is a complex change and I just want to see what it will look like to get dev mode working.

Add type: "module" to your content script options:

export default defineContentScript({
  type: "module",
  // ...
});

This closes #357.

Todo

  • Build mode works
  • Try out dev mode... Not sure what will be required there yet

@aklinker1 aklinker1 self-assigned this Feb 3, 2024
Copy link

netlify bot commented Feb 3, 2024

Deploy Preview for creative-fairy-df92c4 ready!

Name Link
🔨 Latest commit f39cfdc
🔍 Latest deploy log https://app.netlify.com/sites/creative-fairy-df92c4/deploys/65bf568ab6df77000863994e
😎 Deploy Preview https://deploy-preview-406--creative-fairy-df92c4.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

// type: 'module',
type: 'module',
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert

Copy link

codecov bot commented Feb 3, 2024

Codecov Report

Attention: 12 lines in your changes are missing coverage. Please review.

Comparison is base (66bd957) 80.59% compared to head (36e689d) 80.57%.
Report is 11 commits behind head on main.

❗ Current head 36e689d differs from pull request most recent head f39cfdc. Consider uploading reports for the commit f39cfdc to get more accurate results

Files Patch % Lines
src/core/utils/building/internal-build.ts 14.28% 12 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #406      +/-   ##
==========================================
- Coverage   80.59%   80.57%   -0.03%     
==========================================
  Files         108      109       +1     
  Lines        7782     7875      +93     
  Branches      706      716      +10     
==========================================
+ Hits         6272     6345      +73     
- Misses       1494     1514      +20     
  Partials       16       16              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aklinker1
Copy link
Collaborator Author

Closing in favor of #584

@aklinker1 aklinker1 closed this Mar 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Content Script ESM Support
1 participant