Skip to content

Commit

Permalink
chore(stencil): add config transform for svgs
Browse files Browse the repository at this point in the history
  • Loading branch information
brandyscarney committed Jun 25, 2024
1 parent 5c03503 commit 37806d2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions core/stencil.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ export const config: Config = {
moduleNameMapper: {
"@utils/test": ["<rootDir>/src/utils/test/utils"],
"@utils/logging": ["<rootDir>/src/utils/logging"],
"^.+\\.svg": "<rootDir>/svgTransform.js"
},
setupFilesAfterEnv: ['./setupJest.js']
},
Expand Down
11 changes: 11 additions & 0 deletions core/svgTransform.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
process() {
return {
code: `module.exports = {};`,
};
},
getCacheKey() {
// The output is always the same.
return "svgTransform";
},
};

0 comments on commit 37806d2

Please sign in to comment.