React JS 最小脚本 Link 不工作
React JS min Script Link not working
使用 IntelliJ Idea 并创建了一个 index.htm 文件
我只是想在服务器端包含以下 link 和 运行 代码
屏幕上没有呈现任何内容:
<html >
<head>
<script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
<title>Live Link</title>
</head>
<body>
<div id="Output"></div>
<script type="text/babel">
ReactDOM.render(<h1>Hello Human</h1>, window.document.getElementById('Output'));
</script>
</body>
</html>
旧版本 link 有效,但新版本 link 无效。
Getting below Error in Console.log:
babel.min.js:5 Uncaught SyntaxError: Invalid regular expression: Range out of order in character class
at new RegExp (<anonymous>)
at Object.<anonymous> (babel.min.js:5)
at t (babel.min.js:1)
at Object.t.__esModule (babel.min.js:19)
at t (babel.min.js:1)
at Object.<anonymous> (babel.min.js:2)
at t (babel.min.js:1)
at Object.e.exports (babel.min.js:1)
at t (babel.min.js:1)
at Object.e.exports.version (babel.min.js:1)
(anonymous) @ babel.min.js:5
t @ babel.min.js:1
t.__esModule @ babel.min.js:19
t @ babel.min.js:1
(anonymous) @ babel.min.js:2
t @ babel.min.js:1
e.exports @ babel.min.js:1
t @ babel.min.js:1
e.exports.version @ babel.min.js:1
t @ babel.min.js:1
t.__esModule @ babel.min.js:16
t @ babel.min.js:1
t.__esModule @ babel.min.js:11
t @ babel.min.js:1
(anonymous) @ babel.min.js:2
t.__esModule @ babel.min.js:2
t @ babel.min.js:1
t.__esModule @ babel.min.js:10
t @ babel.min.js:1
t.__esModule @ babel.min.js:14
t @ babel.min.js:1
t.__esModule @ babel.min.js:1
t @ babel.min.js:1
(anonymous) @ babel.min.js:1
(anonymous) @ babel.min.js:1
(anonymous) @ babel.min.js:1
(anonymous) @ babel.min.js:1
raven.min.js:2 <img>
压缩后的 babel.min.js
包含 utf-8 编码的字符串。您可以通过将 <meta charset="utf-8">
放入 <head>
.
来使您的示例工作
使用 IntelliJ Idea 并创建了一个 index.htm 文件
我只是想在服务器端包含以下 link 和 运行 代码
屏幕上没有呈现任何内容:
<html >
<head>
<script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
<title>Live Link</title>
</head>
<body>
<div id="Output"></div>
<script type="text/babel">
ReactDOM.render(<h1>Hello Human</h1>, window.document.getElementById('Output'));
</script>
</body>
</html>
旧版本 link 有效,但新版本 link 无效。
Getting below Error in Console.log:
babel.min.js:5 Uncaught SyntaxError: Invalid regular expression: Range out of order in character class
at new RegExp (<anonymous>)
at Object.<anonymous> (babel.min.js:5)
at t (babel.min.js:1)
at Object.t.__esModule (babel.min.js:19)
at t (babel.min.js:1)
at Object.<anonymous> (babel.min.js:2)
at t (babel.min.js:1)
at Object.e.exports (babel.min.js:1)
at t (babel.min.js:1)
at Object.e.exports.version (babel.min.js:1)
(anonymous) @ babel.min.js:5
t @ babel.min.js:1
t.__esModule @ babel.min.js:19
t @ babel.min.js:1
(anonymous) @ babel.min.js:2
t @ babel.min.js:1
e.exports @ babel.min.js:1
t @ babel.min.js:1
e.exports.version @ babel.min.js:1
t @ babel.min.js:1
t.__esModule @ babel.min.js:16
t @ babel.min.js:1
t.__esModule @ babel.min.js:11
t @ babel.min.js:1
(anonymous) @ babel.min.js:2
t.__esModule @ babel.min.js:2
t @ babel.min.js:1
t.__esModule @ babel.min.js:10
t @ babel.min.js:1
t.__esModule @ babel.min.js:14
t @ babel.min.js:1
t.__esModule @ babel.min.js:1
t @ babel.min.js:1
(anonymous) @ babel.min.js:1
(anonymous) @ babel.min.js:1
(anonymous) @ babel.min.js:1
(anonymous) @ babel.min.js:1
raven.min.js:2 <img>
压缩后的 babel.min.js
包含 utf-8 编码的字符串。您可以通过将 <meta charset="utf-8">
放入 <head>
.