react-diagrams icon indicating copy to clipboard operation
react-diagrams copied to clipboard

Couldn't able to generate production build using webpack command

Open akhilesh-sankey opened this issue 8 years ago • 3 comments

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

srd2_error

akhilesh-sankey avatar Mar 12 '18 15:03 akhilesh-sankey

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 :|

dylanvorster avatar Mar 12 '18 22:03 dylanvorster

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

dylanvorster avatar Mar 13 '18 19:03 dylanvorster

Please also see the new commands: https://github.com/projectstorm/react-diagrams/blob/64ec2dd0a4ecd76a5f3ce7b683bca03ac2171bc0/package.json#L24

dylanvorster avatar Mar 13 '18 19:03 dylanvorster