Skip to content

runtime~main.xxxx.js is inserted as inline script in generated index.html #5309

Closed
@stereobooster

Description

@stereobooster

Is this a bug report?

Not sure. It seems like bug, but maybe there is a reason for this behaviour.

Did you try recovering your dependencies?

Yes

Which terms did you search for in User Guide?

None

Environment

  System:
    OS: macOS High Sierra 10.13.3
    CPU: x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
  Binaries:
    Node: 9.10.1 - ~/.nvm/versions/node/v9.10.1/bin/node
    Yarn: 1.5.1 - /usr/local/bin/yarn
    npm: 5.6.0 - ~/.nvm/versions/node/v9.10.1/bin/npm
  Browsers:
    Chrome: 69.0.3497.100
    Firefox: 62.0.2
    Safari: 11.0.3
  npmPackages:
    react: ^16.4.2 => 16.5.0 
    react-dom: ^16.4.2 => 16.5.0 
    react-scripts: 2.0.4 => 2.0.3 
  npmGlobalPackages:
    create-react-app: Not Found

Steps to Reproduce

  1. yarn build
  2. inspect build/index.html
  3. find <script type="text/javascript">... right below <div id="root" />, which contains the same JS as in build/static/js/runtime~main.xxxx.js

Expected Behavior

I expect to see <script src="static/js/runtime~main.xxxx.js"> instead of inline script

Actual Behavior

As I said it inlines runtime~main.xxxx.js for some reason.

Reproducible Demo

npx create-react-app cra2bug
cd cra2bug
yarn build

react-scripts v2.0.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions