Skip to content

Instantly share code, notes, and snippets.

Avatar

Ismayil Khayredinov hypeJunction

View GitHub Profile
View config-overrides.js
// config-overrides.js
const fs = require('fs');
const path = require('path');
const {
override,
removeModuleScopePlugin,
babelInclude,
addWebpackAlias,
} = require('customize-cra');
View 1-package.json
// @me/my-local-package/package.json
{
"peerDependencies": {
"react": ">=16.0.0",
"react-dom": ">=16.0.0"
},
"devDependencies": {
"react": "^16.13.0",
"react-dom": "^16.13.0"
}
View config-overrides.js
// config-overrides.js
const fs = require('fs');
const path = require('path');
const {
override,
removeModuleScopePlugin,
babelInclude,
} = require('customize-cra');
module.exports = override(
View config-overrides.js
// config-overrides.js
const {
override,
removeModuleScopePlugin,
} = require('customize-cra');
module.exports = override(
removeModuleScopePlugin()
);
View config-overrides.js
// config-overrides.js
const { override } = require('customize-cra');
module.exports = override();
View package.json
// package.json
{
"scripts": {
"start": "PORT=3000 react-app-rewired start",
"build": "react-app-rewired build"
}
}
View prefetch-json.html
<link
rel="prefetch"
href="/v2/translations/de"
as="fetch"
type="application/json"
/>
<script>
fetch('/v2/translations/de', {
headers: {
Accept: 'application/json'
View scripts.html
<script type="module" src="critical.js"></script>
<script defer type="module" src="critical.js"></script>
<script async type="module" src="critical.js"></script>
<script async defer type="module" src="critical.js"></script>
<script type="module">
import('critical.js');
View entrypoints-manifest.json
{
"js/account": [
"npm/style-loader/lib.d3b8c4ee.js",
"npm/reactstrap/es.d61ea482.js",
"npm/react-intl/components.c4b4cc2e.js",
"npm/babel/runtime/esm.ead69ce2.js",
"npm/fortawesome/pro-regular-svg-icons/module.0a58d79f.js",
"npm/fortawesome/fontawesome-svg-core/module.5609e28f.js",
"npm/fortawesome/react-fontawesome/module.1664e4cd.js",
"npm/setimmediate/module.9194c539.js",
View webpack-optimization.js
module.exports = {
optimization: {
runtimeChunk: false,
splitChunks: {
chunks: 'all',
maxInitialRequests: Infinity,
minSize: 0,
cacheGroups: {
default: false,
vendor: {
You can’t perform that action at this time.