diff --git a/docusaurus/docs/using-the-public-folder.md b/docusaurus/docs/using-the-public-folder.md index 9a935827bae..e5c7d366b2a 100644 --- a/docusaurus/docs/using-the-public-folder.md +++ b/docusaurus/docs/using-the-public-folder.md @@ -29,7 +29,7 @@ If you put a file into the `public` folder, it will **not** be processed by Webp Inside `index.html`, you can use it like this: ```html - + ``` Only files inside the `public` folder will be accessible by `%PUBLIC_URL%` prefix. If you need to use a file from `src` or `node_modules`, you’ll have to copy it there to explicitly specify your intention to make this file a part of the build. diff --git a/packages/react-dev-utils/README.md b/packages/react-dev-utils/README.md index d89dc95f667..3011d8286d0 100644 --- a/packages/react-dev-utils/README.md +++ b/packages/react-dev-utils/README.md @@ -44,7 +44,7 @@ module.exports = { template: path.resolve('public/index.html'), }), // Makes the public URL available as %PUBLIC_URL% in index.html, e.g.: - // + // new InterpolateHtmlPlugin(HtmlWebpackPlugin, { PUBLIC_URL: publicUrl, // You can pass any key-value pairs, this was just an example. diff --git a/packages/react-scripts/config/webpack.config.js b/packages/react-scripts/config/webpack.config.js index f75782722d7..f88910d4dbe 100644 --- a/packages/react-scripts/config/webpack.config.js +++ b/packages/react-scripts/config/webpack.config.js @@ -598,7 +598,7 @@ module.exports = function(webpackEnv) { new InlineChunkHtmlPlugin(HtmlWebpackPlugin, [/runtime-.+[.]js/]), // Makes some environment variables available in index.html. // The public URL is available as %PUBLIC_URL% in index.html, e.g.: - // + // // In production, it will be an empty string unless you specify "homepage" // in `package.json`, in which case it will be the pathname of that URL. // In development, this will be an empty string. diff --git a/packages/react-scripts/config/webpackDevServer.config.js b/packages/react-scripts/config/webpackDevServer.config.js index 60a9713df33..1c8794fc616 100644 --- a/packages/react-scripts/config/webpackDevServer.config.js +++ b/packages/react-scripts/config/webpackDevServer.config.js @@ -51,7 +51,7 @@ module.exports = function(proxy, allowedHost) { // Instead, we establish a convention that only files in `public` directory // get served. Our build script will copy `public` into the `build` folder. // In `index.html`, you can get URL of `public` folder with %PUBLIC_URL%: - // + // // In JavaScript code, you can access it with `process.env.PUBLIC_URL`. // Note that we only recommend to use `public` folder as an escape hatch // for files like `favicon.ico`, `manifest.json`, and libraries that are diff --git a/packages/react-scripts/fixtures/kitchensink/integration/env.test.js b/packages/react-scripts/fixtures/kitchensink/integration/env.test.js index 7181c2fa78d..48a41d1fc81 100644 --- a/packages/react-scripts/fixtures/kitchensink/integration/env.test.js +++ b/packages/react-scripts/fixtures/kitchensink/integration/env.test.js @@ -54,7 +54,7 @@ describe('Integration', () => { `${prefix}.` ); expect( - doc.querySelector('head link[rel="shortcut icon"]').getAttribute('href') + doc.querySelector('head link[rel="icon"]').getAttribute('href') ).toBe(`${prefix}/favicon.ico`); }); diff --git a/packages/react-scripts/fixtures/kitchensink/public/index.html b/packages/react-scripts/fixtures/kitchensink/public/index.html index 26f96719978..42c66c7677a 100644 --- a/packages/react-scripts/fixtures/kitchensink/public/index.html +++ b/packages/react-scripts/fixtures/kitchensink/public/index.html @@ -3,7 +3,7 @@
- +