Skip to content

Commit

Permalink
fix: use url loader for icon
Browse files Browse the repository at this point in the history
  • Loading branch information
Ninerian committed Jun 24, 2024
1 parent e1cb852 commit 09f02a5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
1 change: 1 addition & 0 deletions samples/weather-forecast/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"ts-loader": "^9.2.5",
"ts-node": "10.2.1",
"typescript": "4.4.2",
"url-loader": "^4.1.1",
"webpack": "^5.51.1",
"webpack-cli": "^4.8.0",
"webpack-dev-server": "^4.1.0",
Expand Down
10 changes: 9 additions & 1 deletion samples/weather-forecast/webpack.common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,15 @@ const config: webpack.Configuration = {
},
{
test: /\.svg$/i,
use: ["@svgr/webpack"],
use: [{ loader: "@svgr/webpack", options: { icon: true } }],
},
{
test: /weather-forecast\.svg$/,
use: [
{
loader: "url-loader",
},
],
},
],
},
Expand Down
14 changes: 9 additions & 5 deletions samples/weather-forecast/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2485,11 +2485,6 @@
dependencies:
"@sinonjs/commons" "^1.7.0"

"@staffbase/[email protected]":
version "1.0.0"
resolved "https://npm.pkg.github.com/download/@Staffbase/browserslist-config/1.0.0/57ddcbc99a2509ba6a58e37ec6c2730dccc875de#57ddcbc99a2509ba6a58e37ec6c2730dccc875de"
integrity sha512-IvzkYFUaeH/BIrg097Lw3L/pO2XRIEJEcPmmnhORrZrbnpoWknx836sm6te8fad9qRjQwY+y0UzuWX2VcEtFhg==

"@staffbase/widget-sdk@^3.3.3":
version "3.3.3"
resolved "https://registry.yarnpkg.com/@staffbase/widget-sdk/-/widget-sdk-3.3.3.tgz#79da379765dddedd76d50dbf955f01a9e3a4907f"
Expand Down Expand Up @@ -8305,6 +8300,15 @@ uri-js@^4.2.2:
dependencies:
punycode "^2.1.0"

url-loader@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-4.1.1.tgz#28505e905cae158cf07c92ca622d7f237e70a4e2"
integrity sha512-3BTV812+AVHHOJQO8O5MkWgZ5aosP7GnROJwvzLS9hWDj00lZ6Z0wNak423Lp9PBZN05N+Jk/N5Si8jRAlGyWA==
dependencies:
loader-utils "^2.0.0"
mime-types "^2.1.27"
schema-utils "^3.0.0"

url@^0.11.0:
version "0.11.0"
resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1"
Expand Down

0 comments on commit 09f02a5

Please sign in to comment.