Skip to content

String is modified in the production build #4100

Description

@agentcooper

Is this a bug report?

Yes.

Did you try recovering your dependencies?

This is about a clean new project.

Environment

  1. node -v: 8.9.4
  2. npm -v: 5.6.0
  3. npm ls react-scripts: 1.1.1
  4. Operating system: macOS

Steps to reproduce

  1. create-react-app minification-test && cd minification-test
  2. Replace App.js with
importReact,{Component}from'react';classAppextendsComponent{render(){consttest=`<Script></Script>`;return(<p>{test}</p>);}}exportdefaultApp;
  1. npm run build
  2. serve -s build (npm install serve -g if needed)

Expected behavior

I expect to see <Script></Script> on the screen.

Actual behavior

I see <Script></script> – the second script is lowercase.

Reproducible demo

npm start:
ok

Build:
broken

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions