diff --git a/.storybook/webpack.config.js b/.storybook/webpack.config.js index 7cf4825e..61444c0a 100644 --- a/.storybook/webpack.config.js +++ b/.storybook/webpack.config.js @@ -1,5 +1,8 @@ const path = require('path'); +const pathPrefix = process.env.PATH_PREFIX || ''; +const imagePathPrefix = pathPrefix ? pathPrefix.replace(/\/?$/, '/') : '/'; + module.exports = { module: { rules: [ @@ -30,7 +33,7 @@ module.exports = { options: { lessOptions: { modifyVars: { - '@prefix': '/', + '@prefix': imagePathPrefix, }, }, },