Skip to content

Commit

Permalink
fix: Resolve absolute paths from the public directory properly (wxt-d…
Browse files Browse the repository at this point in the history
  • Loading branch information
aklinker1 authored Mar 31, 2024
1 parent d3b14af commit bb90029
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion demo/src/entrypoints/background.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import messages from 'public/_locales/en/messages.json';
import messages from '~/public/_locales/en/messages.json';

export default defineBackground({
// type: 'module',
Expand Down
3 changes: 0 additions & 3 deletions demo/wxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ export default defineConfig({
},
],
},
alias: {
public: 'src/public',
},
zip: {
downloadPackages: ['sass'],
},
Expand Down
2 changes: 2 additions & 0 deletions src/core/builders/vite/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ export async function createViteBuilder(
config.mode = wxtConfig.mode;

config.build ??= {};
config.publicDir = wxtConfig.publicDir;
config.build.copyPublicDir = false;
config.build.outDir = wxtConfig.outDir;
config.build.emptyOutDir = false;
// Disable minification for the dev command
Expand Down

0 comments on commit bb90029

Please sign in to comment.