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.
They are defined here:
You'll have to use dangerouslyUpdateWebpackConfig option to change them: https://react-styleguidist.js.org/docs/configuration#dangerouslyupdatewebpackconfig
So, the solution is:
dangerouslyUpdateWebpackConfig(webpackConfig, env) {
webpackConfig.output.filename = 'build/bundle.js'
webpackConfig.output.chunkFilename = 'build/[name].js'
return webpackConfig
}
Most helpful comment
They are defined here:
https://github.com/styleguidist/react-styleguidist/blob/7b8f160e8f13f6ca0a98c316f6b89fc09646f5ca/scripts/make-webpack-config.js#L62-L63
You'll have to use
dangerouslyUpdateWebpackConfigoption to change them: https://react-styleguidist.js.org/docs/configuration#dangerouslyupdatewebpackconfig