-
-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: extra and invalid paths in Webpack v5 (#249)
* Fixing extra and invalid paths in Webpack 5 * trying the npm fix * allowing for any hash * removing all the extra logic
- Loading branch information
1 parent
4d3e935
commit ef1f875
Showing
9 changed files
with
130 additions
and
47 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
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,25 @@ | ||
/* | ||
* This file sets Webpack version - both devDependencies and peerDependencies. | ||
* | ||
* This is, for some reason, needed with Windows and maybe npm 6. Running | ||
* "npm install webpack -D" AND manually updating the peerDependencies | ||
* (because npm 6 does not do that but npm 7 does) is not enough. For some | ||
* reason why must, by hand, update the package.json file first and then | ||
* run a normal "npm install". | ||
*/ | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
const version = process.argv[2]; | ||
if (!version) { | ||
console.log('Please pass the webpack version - "^4" or "^5" - as an argument.'); | ||
|
||
process.exit(1); | ||
} | ||
|
||
const packageData = JSON.parse(fs.readFileSync(path.join(__dirname, 'package.json'))); | ||
packageData.peerDependencies.webpack = version; | ||
|
||
packageData.devDependencies.webpack = version; | ||
|
||
fs.writeFileSync(path.join(__dirname, 'package.json'), JSON.stringify(packageData, null, 2)); |
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 @@ | ||
import '../../assets/manifest.svg'; |
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