Skip to content

Commit

Permalink
fix missing svg not loading & switch to commonjs build for now
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnyTheCarrot committed Jun 23, 2023
1 parent 101dace commit e99b55c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@widgetbot/message-renderer",
"version": "v1.2.4",
"version": "v1.2.5",
"description": "",
"main": "dist/index.js",
"module": "dist/index.js",
Expand Down
3 changes: 2 additions & 1 deletion src/core/svgs.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useContext } from "react";

import SvgMissingAsset from "../assets/libAssets/missing-asset.svg";
const SvgMissingAsset =
"data:image/svg+xml,%3Csvg width='64' height='64' viewBox='0 0 64 64' fill='none' xmlns='http://www.w3.org/2000/svg' id='svg'%3E%3Cg clip-path='url(%23clip0_604_44)'%3E%3Crect width='64' height='64' rx='6' fill='black'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0 0H32V32H0V0ZM64 32V64H32V32H64Z' fill='%23DC3ADF'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_604_44'%3E%3Crect width='64' height='64' rx='6' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A";
import { ConfigContext } from "./ConfigContext";

export type SvgConfig = Record<Svg, string>;
Expand Down
6 changes: 3 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"resolveJsonModule": true,
"skipLibCheck": true,
"target": "es6",
"module": "ESNext",
"module": "commonjs",
"sourceMap": true,
"esModuleInterop": true,
"lib": ["esnext", "es6", "dom"],
Expand All @@ -19,8 +19,8 @@
"rootDir": "src",
"baseUrl": ".",
},
"include": ["src/**/*",
"src/assets/libAssets/missing-asset.svg"
"include": [
"src/**/*"
],
"exclude": ["node_modules", "src/stories"]
}

0 comments on commit e99b55c

Please sign in to comment.