-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(loader): get rid of webpack--version
Webpack versions util cause some troubles, so this fix should cover them BREAKING CHANGE: delete get-webpack-version.js ISSUES CLOSED: #437, #417
- Loading branch information
Stanislav Germanovskii
committed
Mar 6, 2021
1 parent
4ed89bf
commit 54a0c6b
Showing
7 changed files
with
23 additions
and
55 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
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 |
---|---|---|
@@ -1,14 +1,11 @@ | ||
/* eslint-disable global-require */ | ||
const getWebpackVersion = require('./get-webpack-version'); | ||
|
||
let getMatchedRule = null; | ||
|
||
if (getWebpackVersion.IS_5) { | ||
// webpack5 and upper | ||
getMatchedRule = require('./get-matched-rule-5'); | ||
} else { | ||
// webpack4 and lower | ||
try { | ||
getMatchedRule = require('./get-matched-rule-4'); | ||
} catch (e) { | ||
getMatchedRule = require('./get-matched-rule-5'); | ||
} | ||
|
||
module.exports = getMatchedRule; |
This file was deleted.
Oops, something went wrong.
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