@@ -43,6 +43,10 @@ var _iframe2 = _interopRequireDefault(_iframe);
4343
4444var _utils = require ( './utils' ) ;
4545
46+ var _uuid = require ( 'uuid' ) ;
47+
48+ var _uuid2 = _interopRequireDefault ( _uuid ) ;
49+
4650function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { default : obj } ; }
4751
4852process . env . NODE_ENV = process . env . NODE_ENV || 'production' ;
@@ -91,11 +95,12 @@ if (_commander2.default.staticDir) {
9195 } ) ;
9296}
9397
98+ var cacheKey = _uuid2 . default . v4 ( ) ;
9499// Write both the storybook UI and IFRAME HTML files to destination path.
95100var headHtml = ( 0 , _utils . getHeadHtml ) ( configDir ) ;
96101var publicPath = config . output . publicPath ;
97- _fs2 . default . writeFileSync ( _path2 . default . resolve ( outputDir , 'index.html' ) , ( 0 , _index2 . default ) ( publicPath ) ) ;
98- _fs2 . default . writeFileSync ( _path2 . default . resolve ( outputDir , 'iframe.html' ) , ( 0 , _iframe2 . default ) ( headHtml , publicPath ) ) ;
102+ _fs2 . default . writeFileSync ( _path2 . default . resolve ( outputDir , 'index.html' ) , ( 0 , _index2 . default ) ( publicPath , cacheKey ) ) ;
103+ _fs2 . default . writeFileSync ( _path2 . default . resolve ( outputDir , 'iframe.html' ) , ( 0 , _iframe2 . default ) ( headHtml , publicPath , cacheKey ) ) ;
99104
100105// compile all resources with webpack and write them to the disk.
101106logger . log ( 'Building storybook ...' ) ;
0 commit comments