Couldn't able to generate production build using webpack command
I am trying to build the production version using the "WEBPACK" command sepecified in the library documentation, but it seems like I am missing something. Can you please guide me which all steps I am missing.
Find the screnshot for the same issue.
I have used
webpack --mode production command
Im working on it, its because of webpack 4 + storybook + ts-loader. We need Storybook to move to webpack 4 before we can fix it. FWIW, you probably didn't run webpack from the node modules, but probably used your global version :|
The new 5.1.0 which is being released shortly, switches to awesome typescript loader that fixes this, but im still convinced that the reason you are getting the above error is because you are not running ./node_modules/.bin/webpack but were instead using webpack. You can also install direnv and then the above command will be aliased to webpack thanks to the envrc. The other way to build correctly in this library, is to use NODE_ENV=production webpack
Please also see the new commands: https://github.com/projectstorm/react-diagrams/blob/64ec2dd0a4ecd76a5f3ce7b683bca03ac2171bc0/package.json#L24