insin / nwb

A toolkit for React, Preact, Inferno & vanilla JS apps, React libraries and other npm modules for the web, with no configuration (until you need it)
Other
5.57k stars 331 forks source link

Export Webpack Configuration File #571

Open alecmerdler opened 3 years ago

alecmerdler commented 3 years ago

In order to add Cypress component testing to a project, I need access to the webpack.config.js file. There is effectively no way to "eject" a React app generated using nwb (to use create-react-app terminology).

The FAQ tells you how to set the debug flag to view the generated Webpack configuration, but it renders the runtime representation (aka console.log) which contains things like [Function] and cannot be copied. It might be possible for me to re-create the Webpack config file by diving into the nwb codebase, but nwb should be able to simply write out the config file being used so it can be require()-d by other tools.

mexomagno commented 1 year ago

Hi @alecmerdler! I'm facing the exact same problem 1.5 years after you. Were you able to find an alternative way of hooking up Cypress component testing to nwb?