-
-
Notifications
You must be signed in to change notification settings - Fork 607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: shareable webpack configs using extends
#3738
Merged
alexander-akait
merged 20 commits into
webpack:master
from
burhanuday:feature/extends-config
Apr 29, 2023
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
b7a2288
feat: pickup extends from cli and prepend to configs
01b6f90
feat: handle cli param as well as webpack config file extends property
476bb7a
refactor: simplify to two cases
6e81a15
refactor: temporarily override webpack types to add extends
333e9d3
fix: missing promise await
2c633df
refactor: simplify cases
f7c6c71
feat: recursively merge extended configs
64be604
fix: bug where configs were not flattened
1e77f86
test: add tests for webpack config option
46bd66a
test: add testcase for cli option
b3dbe04
Merge branch 'master' into feature/extends-config
ff6c569
fix: add missing help level property
1c044cc
test: update snapshots
146d107
test: increase coverage
78d99ed
refactor: code
alexander-akait 8547cf8
refactor: fix problems with cache
alexander-akait 0f35d92
refactor: refacor paths
alexander-akait f8ba736
refactor: catch recursive calls
alexander-akait c348c66
fix: bug and tests
alexander-akait ce7c6cb
test: more
alexander-akait File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = () => { | ||
console.log("base.webpack.config.js"); | ||
|
||
return { | ||
name: "base_config", | ||
mode: "development", | ||
entry: "./src/index.js", | ||
}; | ||
}; |
10 changes: 10 additions & 0 deletions
10
test/build/extends/extends-cli-option/deep.base.webpack.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module.exports = () => { | ||
console.log("deep.base.webpack.config.js"); | ||
|
||
return { | ||
name: "base_config", | ||
mode: "development", | ||
entry: "./src/index.js", | ||
bail: true, | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
console.log("i am index.js") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const WebpackCLITestPlugin = require("../../../utils/webpack-cli-test-plugin"); | ||
|
||
module.exports = () => { | ||
console.log("derived.webpack.config.js"); | ||
|
||
return { | ||
plugins: [new WebpackCLITestPlugin()], | ||
}; | ||
}; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move it to own function and just use
&& { extend: string[] }
to avoidts-except-error