We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3b34b9c commit 0f8aeaeCopy full SHA for 0f8aeae
1 file changed
packages/fxa-settings/.storybook/webpack.config.js
@@ -2,4 +2,16 @@
2
* License, v. 2.0. If a copy of the MPL was not distributed with this
3
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5
-module.exports = require('fxa-react/configs/storybooks').customizeWebpackConfig;
+const { customizeWebpackConfig } = require('fxa-react/configs/storybooks');
6
+
7
+module.exports = (options) => {
8
+ const config = customizeWebpackConfig(options);
9
+ // Inline jpg/jpeg as base64 data URLs so they resolve correctly when used
10
+ // in CSS custom properties (relative URLs resolve against the stylesheet,
11
+ // not the document, causing 404s in hosted Storybook).
12
+ config.module.rules[0].oneOf.unshift({
13
+ test: /\.(jpg|jpeg)$/,
14
+ type: 'asset/inline',
15
+ });
16
+ return config;
17
+};
0 commit comments