diff --git a/src/playground/ec/.storybook/main.js b/src/playground/ec/.storybook/main.js index 211cd0845ed..a2fd37c5d8e 100644 --- a/src/playground/ec/.storybook/main.js +++ b/src/playground/ec/.storybook/main.js @@ -3,7 +3,6 @@ const webpack = require('webpack'); const isProd = process.env.NODE_ENV === 'production'; const outputFolder = isProd ? 'dist' : 'build'; - const publicUrl = process.env.PUBLIC_URL || ''; const stories = ['../../../implementations/twig/**/!(eu*).story.js']; @@ -18,12 +17,17 @@ const addons = [ '@storybook/addon-a11y', ]; -const staticDirs = [ +let staticDirs = [ path.resolve(`${__dirname}/../../../presets/ec/${outputFolder}`), path.resolve(`${__dirname}/../../../presets/reset/${outputFolder}`), path.resolve(`${__dirname}/../../../presets/rtl/${outputFolder}`), ]; +// FRONT-3789 - No need for static dirs, we manually copy the files. +if (isProd) { + staticDirs = []; +} + const webpackFinal = (config) => { // Trick "babel-loader", force it to transpile @ecl addons config.module.rules[0].exclude = /node_modules\/(?!@ecl\/).*/; diff --git a/src/playground/eu/.storybook/main.js b/src/playground/eu/.storybook/main.js index 19ce7b8ab7d..43b358b4389 100644 --- a/src/playground/eu/.storybook/main.js +++ b/src/playground/eu/.storybook/main.js @@ -3,7 +3,6 @@ const webpack = require('webpack'); const isProd = process.env.NODE_ENV === 'production'; const outputFolder = isProd ? 'dist' : 'build'; - const publicUrl = process.env.PUBLIC_URL || ''; const stories = ['../../../implementations/twig/**/!(ec*).story.js']; @@ -18,12 +17,17 @@ const addons = [ '@storybook/addon-a11y', ]; -const staticDirs = [ +let staticDirs = [ path.resolve(`${__dirname}/../../../presets/eu/${outputFolder}`), path.resolve(`${__dirname}/../../../presets/reset/${outputFolder}`), path.resolve(`${__dirname}/../../../presets/rtl/${outputFolder}`), ]; +// FRONT-3789 - No need for static dirs, we manually copy the files. +if (isProd) { + staticDirs = []; +} + const webpackFinal = (config) => { // Trick "babel-loader", force it to transpile @ecl addons config.module.rules[0].exclude = /node_modules\/(?!@ecl\/).*/;