Skip to content

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

Merged
aklinker1 merged 3 commits into
0.20.0-breaking-changesfrom
root-public-dir
Nov 28, 2024
Merged

aklinker1 merged 3 commits into
0.20.0-breaking-changesfrom
root-public-dir

Conversation

@aklinker1

@aklinker1 aklinker1 commented Nov 26, 2024 •

Copy link
Copy Markdown
Member

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

@codecov

codecov Bot commented Nov 26, 2024 •

Copy link
Copy Markdown

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
26 of 28 tasks
@aklinker1
aklinker1 merged commit 6271e13 into 0.20.0-breaking-changes Nov 28, 2024
@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