Webpack customization examples do not work
See original GitHub issueDescribe the bug I want to change the webpack config to make my existing project compatible with renative (specifically tizen). The documentation states
Webpack config file of your web app:
./platformBuilds/helloworld_web/webpack.config.js
Will be overridden with:
./appConfigs/base/builds/web/webpack.config.js
However, the custom webpack.config.js is never used.
To Reproduce Steps to reproduce the behavior:
- Run command ‘rnv new’, setup tizen with blank template
- create
./appConfigs/base/builds/web/webpack.config.js
with contentthrow new Error('CUSTOM WEBPACK')
- run
rnv -p tizen
Expected behavior “CUSTOM WEBPACK” should be thrown and show in the console.
Desktop (please complete the following information):
- OS: MacOS
- Node Version v10.21.0
- RNV Version 0.30.4
Additional context
I try to make renative work with my existing typescript project. Plan is to have renative take care of all platforms that are not yet setup. Android, iOS and Web (Next.js) are already implemented via React Native and rather complex apps.
I want to use renative for future platforms like Tizen/webOS. It should boil down to something like import App from '../src/App'
.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (9 by maintainers)
Thanks for the help! As a minor gesture of gratitude, I opened a PR to fix the documentation here.
@EyMaddis you have to override
webpack.config.dev.js
orwebpack.config.prod.js
webpack.config.js won’t have any effectif you check
./platformBuilds/helloworld_web/
you’ll see which files you can overrideIMPORTANT: above applies for
-p web
If you running-p tizen
you have to use tizen folders ofcappConfigs/helloworld/base/builds/tizen/...
with results visible in./platformBuilds/helloworld_tizen/
but above override rules apply in same way as it is same webpack structure