Gathering detailed insights and metrics for react-app-rewire-multiple-entry
Gathering detailed insights and metrics for react-app-rewire-multiple-entry
Gathering detailed insights and metrics for react-app-rewire-multiple-entry
Gathering detailed insights and metrics for react-app-rewire-multiple-entry
react-app-rewired
Tweak the create-react-app webpack config(s) without using 'eject' and without creating a fork of the react-scripts
react-app-rewire-alias
Alias for craco or rewired create-react-app
react-dev-utils
webpack utilities used by Create React App
rewire
Easy dependency injection for node.js unit testing
npm install react-app-rewire-multiple-entry
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
128 Stars
34 Commits
28 Forks
3 Watching
13 Branches
5 Contributors
Updated on 12 Nov 2024
JavaScript (59.66%)
TypeScript (40.34%)
Cumulative downloads
Total Downloads
Last day
6.3%
1,428
Compared to previous day
Last week
-5.6%
6,543
Compared to previous week
Last month
11.9%
25,775
Compared to previous month
Last year
13.5%
306,230
Compared to previous year
1
17
React App Rewire Multiple Entry lets you configure multiple entries in Create React App without ejecting.
1npm install --save-dev react-app-rewired react-app-rewire-multiple-entry
1$ npm install --save-dev react-app-rewired@1.6.2
package.json
1 "scripts": { 2- "start": "react-scripts start", 3+ "start": "react-app-rewired start", 4- "build": "react-scripts build", 5+ "build": "react-app-rewired build", 6- "test": "react-scripts test", 7+ "test": "react-app-rewired test", 8 "eject": "react-scripts eject" 9}
config-overrides.js
in your React app
directory:1// config-overrides.js 2 3const multipleEntry = require('react-app-rewire-multiple-entry')([ 4 { 5 entry: 'src/entry/landing.js', 6 template: 'public/landing.html', 7 outPath: '/landing.html' 8 } 9]); 10 11module.exports = { 12 webpack: function(config, env) { 13 multipleEntry.addMultiEntry(config); 14 return config; 15 } 16};
1// config-overrides.js 2 3const multipleEntry = require('react-app-rewire-multiple-entry')([ 4 { 5 entry: 'src/entry/landing.js', 6 template: 'public/landing.html', 7 outPath: '/landing.html' 8 } 9]); 10 11const { 12 // addBundleVisualizer, 13 override, 14 overrideDevServer 15} = require('customize-cra'); 16 17module.exports = { 18 webpack: override( 19 multipleEntry.addMultiEntry 20 // addBundleVisualizer() 21 ) 22};
1// config-overrides.js 2 3const multipleEntry = require('react-app-rewire-multiple-entry')([ 4 { 5 // Webpack extra entry 6 entry: 'src/entry/standard.js', 7 // HTML template used in plugin HtmlWebpackPlugin 8 template: 'src/entry/standard.html', 9 // The file to write the HTML to. You can specify a subdirectory 10 outPath: '/entry/standard.html' 11 // Visit: http[s]://localhost:3000/entry/standard.html 12 }, 13 { 14 entry: 'src/entry/login.js', 15 // if [template] is empty, Default value: `public/index.html` 16 // template: 'public/index.html', 17 outPath: 'public/login.html' 18 // Visit: http[s]://localhost:3000/public/login.html 19 }, 20 { 21 entry: 'src/entry/404.js', 22 template: 'public/404.html' 23 // if [outPath] is empty, calculated by `path.relative(process.cwd(), template)` --> `public/404.html` 24 // outPath: '/public/404.html' 25 // Visit: http[s]://localhost:3000/public/404.html 26 }, 27 { 28 entry: 'src/entry/home.js' 29 // Default value: `public/index.html` 30 // template: 'public/index.html', 31 // Calculated by `path.relative(process.cwd(), template)` --> `public/index.html` 32 // outPath: '/public/index.html' 33 // Visit: http[s]://localhost:3000/public/index.html 34 } 35]); 36 37module.exports = { 38 webpack: function(config, env) { 39 multipleEntry.addMultiEntry(config); 40 return config; 41 } 42};
You can pass a array of entry configuration options to react-app-rewire-multiple-entry
, the entry in the array has attributes below:
entry
[Required] Webpack entry JS file. Throw error when empty.template
[Optional] HTML template used in plugin HtmlWebpackPlugin. Default value: public/index.html
.outPath
: [Optional] The file wirte the HTML to. You can specify a subdirectory. If empty, it will be calculated by path.relative(process.cwd(), template)
addMultiEntry
Inject settings for multiple entry in webpack configThat’s it! Now you can control mulitple entries, enjoy coding!
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
Found 4/19 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
34 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More