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.

[6.x] Allow function form of the webpack config

See original GitHub issue

Preflight Checklist

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Problem Description

I want to apply tweaks to the configuration using webpack’s (env, args) => ({ ... }) capability.

Proposed Solution

Detect if webpack config is a function instead of an object, if it is - instead of merging the config directly, apply the wrapper function around it.

Alternatives Considered

I evaluated numerous workarounds, but the proper solution is easy to implement, we should pursue it.

Additional Information

I’m on the latest v6 beta. This closes #905. It’s different in that it’s a concrete proposal of the change.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
MOZGIIIcommented, Aug 6, 2020

PR #1556 is ready for the review!

0reactions
MarshallOfSoundcommented, Feb 3, 2022

Duplicate of #905

Read more comments on GitHub >

github_iconTop Results From Across the Web

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 >
[6.x] Add Webpack rules per environment basis (using the ...
I've setup a small project using electron-forge, version 6. I've added css-loader, ... [6.x] Allow function form of the webpack config #1529.
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 >
How to configure Webpack 4 or 5 from scratch for a basic ...
This guide will look at step-by-step Webpack configuration for ES6, SASS, and images/fonts without any framework. It should be enough to start ...
Read more >
A Guide to Managing Webpack Dependencies - Toptal
A Guide to Managing Webpack Dependencies · Configuring Aliases and Relative Paths · Code Splitting · Extracting Styles Into Separate Bundles · Handling...
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