Skip to content

Commit

Permalink
Add imagePathPrefix to Storybook (#1309)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexs-mparticle authored and GitHub Enterprise committed Feb 25, 2021
1 parent 3d939b7 commit ba21ca8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .storybook/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
const path = require('path');

const pathPrefix = process.env.PATH_PREFIX || '';
const imagePathPrefix = pathPrefix ? pathPrefix.replace(/\/?$/, '/') : '/';

module.exports = {
module: {
rules: [
Expand Down Expand Up @@ -30,7 +33,7 @@ module.exports = {
options: {
lessOptions: {
modifyVars: {
'@prefix': '/',
'@prefix': imagePathPrefix,
},
},
},
Expand Down

0 comments on commit ba21ca8

Please sign in to comment.