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

fix!: Make publicDir and modulesDir relative to project root #1216

Merged
merged 3 commits into from
Nov 28, 2024

Conversation

aklinker1
Copy link
Collaborator

@aklinker1 aklinker1 commented Nov 26, 2024

BREAKING CHANGE: WXT's public/ and modules/ directories are now relative to the project root, not srcDir.

If you follow the default folder structure, this is not a breaking change.

If you set a custom srcDir, you have two options:

  1. Keep the folders in the same place and your project config:
    // wxt.config.ts
    export defautl defineConfig({
      srcDir: "src",
    + publicDir: "src/public",
    + modulesDir: "src/modules",
    });
  2. Leave your config as-is and move the your public/ and modules/ directories to the project root:
    + modules/
    + public/
      src/
          components/
          entrypoints/
    -     modules/
    -     public/
          utils/
      wxt.config.ts

This addresses #1209

Copy link

codecov bot commented Nov 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.17%. Comparing base (1db7377) to head (afd591e).
Report is 1 commits behind head on 0.20.0-breaking-changes.

Additional details and impacted files
@@                     Coverage Diff                     @@
##           0.20.0-breaking-changes    #1216      +/-   ##
===========================================================
+ Coverage                    79.99%   80.17%   +0.18%     
===========================================================
  Files                          124      124              
  Lines                         5928     5928              
  Branches                      1003     1002       -1     
===========================================================
+ Hits                          4742     4753      +11     
+ Misses                        1168     1157      -11     
  Partials                        18       18              

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

@aklinker1 aklinker1 marked this pull request as ready for review November 28, 2024 06:26
@aklinker1 aklinker1 mentioned this pull request Nov 28, 2024
21 tasks
@aklinker1 aklinker1 merged commit 6271e13 into 0.20.0-breaking-changes Nov 28, 2024
12 checks passed
@aklinker1 aklinker1 deleted the root-public-dir branch November 28, 2024 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant