moofarm / ssuckssuck-frontend

0 stars 2 forks source link

[BUG] Failed to execute 'createElement' on 'Document' #13

Closed ramrami-B closed 7 months ago

ramrami-B commented 7 months ago

πŸ› Bug Issue

Failed to execute 'createElement' on 'Document': The qualified name provided ('static/media/src/assets/baby_mussuk.svg') contains the invalid character '/'.

πŸ” To-do

ramrami-B commented 7 months ago

πŸ’‘ Solution

.storybook/main.js에 μ•„λž˜ μ½”λ“œ μΆ”κ°€ (webpack μ„€μ •)

webpackFinal: config => {
    const fileLoaderRule = config.module.rules.find(rule => rule.test && rule.test.test(".svg"));
    fileLoaderRule.exclude = /\.svg$/;

    config.module.rules.push({
      test: /\.svg$/,
      enforce: "pre",
      loader: require.resolve("@svgr/webpack"),
    });

    return config;
},

πŸ“š Reference

https://stackoverflow.com/a/61706308/10331102

ramrami-B commented 7 months ago

faa36bb4b66c2c05e98ddcba47670f781448f872

@alex-koko bug μˆ˜μ •ν•΄μ„œ develop λΈŒλžœμΉ˜μ— λ°”λ‘œ push ν–ˆμŠ΅λ‹ˆλ‹€~! 확인 ν›„ 이슈 λ‹«μ•„ μ£Όμ„Έμš” :)

alex-koko commented 7 months ago

ν™•μΈν–ˆμŠ΅λ‹ˆλ‹€! κ³ μƒν•˜μ…¨μ–΄μš”!