Skip to content

Commit

Permalink
Integrate with storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
amrocha committed Sep 12, 2019
1 parent 4a53045 commit aed6ff3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .storybook/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// For more information refer the docs: https://storybook.js.org/configurations/custom-webpack-config

const path = require('path');
const spawn = require('child_process').spawn;

const postcssShopify = require('postcss-shopify');

Expand Down Expand Up @@ -111,6 +112,17 @@ module.exports = ({config, mode}) => {
},
];

config.plugins.push({
apply: (compiler) => {
compiler.hooks.afterEmit.tap('AfterEmitPlugin', (compilation) => {
const spawnedProcess = spawn('yarn splash', {
shell: true,
stdio: 'inherit',
});
});
},
});

config.module.rules = [config.module.rules[0], ...extraRules];

if (isProduction) {
Expand Down

0 comments on commit aed6ff3

Please sign in to comment.