Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #86 from storybookjs/valentin/fix-image-embedding
Browse files Browse the repository at this point in the history
Add esbuild options for handling PNG files
  • Loading branch information
valentinpalkovic authored Jan 26, 2024
2 parents 1c18b81 + 6cf3e64 commit 9eec28b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ export default defineConfig(async (options) => {
target: BROWSER_TARGET,
platform: "browser",
external: globalManagerPackages,
esbuildOptions(options) {
options.conditions = ["module"];
options.loader = {
...options.loader,
".png": "dataurl",
};
},
});
}

Expand Down

0 comments on commit 9eec28b

Please sign in to comment.