diff --git a/samples/weather-forecast/package.json b/samples/weather-forecast/package.json index 40dee9f..b6d93df 100644 --- a/samples/weather-forecast/package.json +++ b/samples/weather-forecast/package.json @@ -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", diff --git a/samples/weather-forecast/webpack.common.ts b/samples/weather-forecast/webpack.common.ts index 9730d36..d732935 100644 --- a/samples/weather-forecast/webpack.common.ts +++ b/samples/weather-forecast/webpack.common.ts @@ -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", + }, + ], }, ], }, diff --git a/samples/weather-forecast/yarn.lock b/samples/weather-forecast/yarn.lock index da92d03..96ab3ee 100644 --- a/samples/weather-forecast/yarn.lock +++ b/samples/weather-forecast/yarn.lock @@ -2485,11 +2485,6 @@ dependencies: "@sinonjs/commons" "^1.7.0" -"@staffbase/browserslist-config@1.0.0": - 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" @@ -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"