Skip to content

Instantly share code, notes, and snippets.

@neoxai
Created June 23, 2019 05:27
Show Gist options
  • Save neoxai/db7dc8b9359c1051c7535fd98c8f5c06 to your computer and use it in GitHub Desktop.
Save neoxai/db7dc8b9359c1051c7535fd98c8f5c06 to your computer and use it in GitHub Desktop.
Patching for netlify /app
patch-package
--- a/node_modules/react-scripts/config/paths.js
+++ b/node_modules/react-scripts/config/paths.js
@@ -79,7 +79,7 @@ module.exports = {
appPath: resolveApp('.'),
appBuild: resolveApp('build'),
appPublic: resolveApp('public'),
- appHtml: resolveApp('public/index.html'),
+ appHtml: resolveApp('public/app.html'),
appIndexJs: resolveModule(resolveApp, 'src/index'),
appPackageJson: resolveApp('package.json'),
appSrc: resolveApp('src'),
@@ -101,7 +101,7 @@ module.exports = {
appPath: resolveApp('.'),
appBuild: resolveApp('build'),
appPublic: resolveApp('public'),
- appHtml: resolveApp('public/index.html'),
+ appHtml: resolveApp('public/app.html'),
appIndexJs: resolveModule(resolveApp, 'src/index'),
appPackageJson: resolveApp('package.json'),
appSrc: resolveApp('src'),
@@ -135,7 +135,7 @@ if (
appPath: resolveApp('.'),
appBuild: resolveOwn('../../build'),
appPublic: resolveOwn('template/public'),
- appHtml: resolveOwn('template/public/index.html'),
+ appHtml: resolveOwn('template/public/app.html'),
appIndexJs: resolveModule(resolveOwn, 'template/src/index'),
appPackageJson: resolveOwn('package.json'),
appSrc: resolveOwn('template/src'),
--- a/node_modules/react-scripts/config/webpack.config.prod.js
+++ b/node_modules/react-scripts/config/webpack.config.prod.js
@@ -470,6 +470,7 @@ module.exports = {
new HtmlWebpackPlugin({
inject: true,
template: paths.appHtml,
+ filename:'app.html',
minify: {
removeComments: true,
collapseWhitespace: true,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment