This repository has been archived by the owner on Feb 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrading webpack-chain to v3.1 (#157)
- Loading branch information
1 parent
9871634
commit d009882
Showing
9 changed files
with
247 additions
and
250 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,8 @@ | ||
module.exports = ({ config }, options) => { | ||
const rule = config.module | ||
.rule('compile') | ||
.test(options.test || /\.jsx?$/) | ||
.use('babel') | ||
.loader(require.resolve('babel-loader')) | ||
.options(options.babel) | ||
.end(); | ||
|
||
if (options.include) { | ||
rule.include.merge(options.include); | ||
} | ||
|
||
if (options.exclude) { | ||
rule.exclude.merge(options.exclude); | ||
} | ||
}; | ||
module.exports = ({ config }, options) => config.module | ||
.rule('compile') | ||
.test(options.test || /\.jsx?$/) | ||
.when(options.include, rule => rule.include.merge(options.include)) | ||
.when(options.exclude, rule => rule.exclude.merge(options.exclude)) | ||
.use('babel') | ||
.loader(require.resolve('babel-loader')) | ||
.options(options.babel); |
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
Oops, something went wrong.