question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Webpack customization examples do not work

See original GitHub issue

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

  1. Run command ‘rnv new’, setup tizen with blank template
  2. create ./appConfigs/base/builds/web/webpack.config.js with content throw new Error('CUSTOM WEBPACK')
  3. 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:closed
  • Created 3 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
EyMaddiscommented, Oct 12, 2020

Thanks for the help! As a minor gesture of gratitude, I opened a PR to fix the documentation here.

0reactions
pavjackocommented, Oct 10, 2020

@EyMaddis you have to override webpack.config.dev.js or webpack.config.prod.js webpack.config.js won’t have any effect

if you check ./platformBuilds/helloworld_web/ you’ll see which files you can override

IMPORTANT: above applies for -p web If you running -p tizen you have to use tizen folders ofc appConfigs/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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack customization examples do not work #585 - GitHub
Steps to reproduce the behavior: Run command 'rnv new', setup tizen with blank template; create ./appConfigs/base/builds/web/webpack.config.js ...
Read more >
All You Need to Know about Webpack in Examples - Medium
What topics this article covers: 1. Simplest project and Webpack installation;; 2. Configuration file;; 3. Regenerate bundle on file save;; 4.
Read more >
Configuration - webpack
dev is an online tool for creating custom webpack configurations. It allows you to select various features that will be combined and added...
Read more >
Writing a custom webpack loader - Redd Developer
A loader in webpack is a function that transforms a source code of imported modules. ... Loaders are the heart and soul of...
Read more >
Customizing Webpack Config - Nx
For most apps, the default configuration of webpack is sufficient, ... The custom webpack file contains a function that takes as input the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found