String is modified in the production build
See original GitHub issueIs this a bug report?
Yes.
Did you try recovering your dependencies?
This is about a clean new project.
Environment
node -v
: 8.9.4npm -v
: 5.6.0npm ls react-scripts
: 1.1.1- Operating system: macOS
Steps to reproduce
create-react-app minification-test && cd minification-test
- Replace
App.js
with
import React, { Component } from 'react';
class App extends Component {
render() {
const test = `<Script></Script>`;
return (
<p>{test}</p>
);
}
}
export default App;
npm run build
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
:
Build:
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Editing a string in the result of a reactapp built with "yarn build ...
I have some reactapp that I build using yarn build --production . In that app there is some string that I want to...
Read more >The StringBuilder Class - The Java™ Tutorials
StringBuilder objects are like String objects, except that they can be modified. Internally, these objects are treated like variable-length arrays that ...
Read more >Configure application settings for Azure Static Web Apps
In this article ... Application settings hold configuration values that may change, such as database connection strings. Adding application ...
Read more >Handling text — strings in JavaScript - Learn web development
In the next article, we'll build on this, looking at some of the built-in methods available to strings in JavaScript and how we...
Read more >How To Debug React Components Using React Developer ...
DigitalOcean React Production Build information ... that splits the text into an array of characters using the split() string method.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This looks like an UglifyJS issue, it is reproducible in UglifyJS playground with following code:
and
inline_script
option enabled.Looks like this was fixed in Uglify. It’ll work its way in here eventually.
Thanks for the report!