Skip to content
This repository was archived by the owner on Oct 9, 2024. It is now read-only.

Commit 6098990

Browse files
committed
install vue-svg-loader to use svg files as Vue components
1 parent a0bfcfe commit 6098990

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"storybook-addon-vue-info": "^1.4.1",
3535
"tailwindcss-plugins": "^0.3.0",
3636
"vue-cli-plugin-storybook": "^1.2.0",
37+
"vue-svg-loader": "^0.15.0",
3738
"vue-template-compiler": "^2.6.10"
3839
},
3940
"eslintConfig": {

vue.config.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
chainWebpack: (config) => {
3+
const svgRule = config.module.rule('svg');
4+
5+
svgRule.uses.clear();
6+
7+
svgRule
8+
.use('vue-svg-loader')
9+
.loader('vue-svg-loader');
10+
},
11+
};

yarn.lock

+16-1
Original file line numberDiff line numberDiff line change
@@ -11506,7 +11506,14 @@ svg-tags@^1.0.0:
1150611506
resolved "https://registry.yarnpkg.com/svg-tags/-/svg-tags-1.0.0.tgz#58f71cee3bd519b59d4b2a843b6c7de64ac04764"
1150711507
integrity sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q=
1150811508

11509-
svgo@^1.0.0:
11509+
svg-to-vue@^0.6.0:
11510+
version "0.6.0"
11511+
resolved "https://registry.yarnpkg.com/svg-to-vue/-/svg-to-vue-0.6.0.tgz#d5de9ec7126ac3c11adf8cfad013a6264ef57184"
11512+
integrity sha512-SYGJMBq5EHt/nIJxZ4kA9A6bilaFXtOPFJRoMQ2ml/jFP4N9L7HVFTm+5WCFN3QFnEUXtH6BHzpoOlwP1/5+2A==
11513+
dependencies:
11514+
svgo "^1.3.2"
11515+
11516+
svgo@^1.0.0, svgo@^1.3.2:
1151011517
version "1.3.2"
1151111518
resolved "https://registry.yarnpkg.com/svgo/-/svgo-1.3.2.tgz#b6dc511c063346c9e415b81e43401145b96d4167"
1151211519
integrity sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw==
@@ -12428,6 +12435,14 @@ vue-style-loader@^4.1.0:
1242812435
hash-sum "^1.0.2"
1242912436
loader-utils "^1.0.2"
1243012437

12438+
vue-svg-loader@^0.15.0:
12439+
version "0.15.0"
12440+
resolved "https://registry.yarnpkg.com/vue-svg-loader/-/vue-svg-loader-0.15.0.tgz#09bb9929c3f8955a246ea80909e26139badc0509"
12441+
integrity sha512-698GfXu9k2wPxI382Qf7MfrtBXjIjThqmOsksVKHqeTvVO+Ary9q69SVzA6EEJmj5vmF5u1KRVb/I1BDh4fPTQ==
12442+
dependencies:
12443+
loader-utils "^1.2.3"
12444+
svg-to-vue "^0.6.0"
12445+
1243112446
vue-template-compiler@^2.0.0, vue-template-compiler@^2.5.16, vue-template-compiler@^2.6.10:
1243212447
version "2.6.11"
1243312448
resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.6.11.tgz#c04704ef8f498b153130018993e56309d4698080"

0 commit comments

Comments
 (0)