React-styleguidist: Static build names

Created on 17 Mar 2018  ·  2Comments  ·  Source: styleguidist/react-styleguidist

Curious.

Is there a way to pre-define file names for the two .js files generated by the styleguide build process?

Currently, those files appear to be "versioned". In my case the names are bundle.a538a71f.js and 0.4a3876a7.js respectively.

I'd appreciate being able to change them to bundle.js and 0.js.

I use React Styleguidist in combination with Docusaurus and need to add the paths to both these files manually, to the template.

question

Most helpful comment

All 2 comments

So, the solution is:

    dangerouslyUpdateWebpackConfig(webpackConfig, env) {
        webpackConfig.output.filename = 'build/bundle.js'
        webpackConfig.output.chunkFilename = 'build/[name].js'
        return webpackConfig
    }
Was this page helpful?
0 / 5 - 0 ratings