Skip to content

Commit

Permalink
chore(storybook): add file-loader for static images (#4986)
Browse files Browse the repository at this point in the history
### Related Ticket(s)

#4976 

### Description

This changes the `web-component` webpack to use `file-loader` instead of `url-loader`. The latter base64 encodes images, which interfere with Storybook when used in knobs.

### Changelog

**Changed**

- Web components webpack config now uses `file-loader`

<!-- labels for the corresponding package: -->
<!-- *** "package: services": Services -->
<!-- *** "package: utilities": Utilities -->
<!-- *** "package: styles": Carbon Expressive -->
<!-- *** "RTL": React / Web Components (RTL) -->
<!-- *** "feature flag": React / Web Components (experimental) -->
  • Loading branch information
kennylam authored Jan 22, 2021
1 parent 8b32c6c commit 0499e44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/web-components/.storybook/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ module.exports = ({ config, mode }) => {
},
{
test: /\.(jpe?g|png|gif)(\?[a-z0-9=.]+)?$/,
loader: 'url-loader',
loader: 'file-loader',
}
);

Expand Down

0 comments on commit 0499e44

Please sign in to comment.