React JS min Script Link无效

时间:2017-11-02 22:31:10

标签: javascript reactjs intellij-idea babel unpkg

使用IntelliJ Idea并创建index.htm文件

我只想尝试包含以下链接并在服务器端运行代码
屏幕上没有任何内容呈现:

<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>

此旧版本链接有效,但新版本链接无效。

https://stackoverflow.com/a/33963992/5078763

  

在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>​

1 个答案:

答案 0 :(得分:4)

缩小的select count(case when Lunchstatus = 'P' then 1 else null end) as Paid , count(case when LunchStatus = 'R' then 1 else null end) as Reduced , count(case when LunchStatus = 'F' then 1 else null end) as Free , count(case when LunchStatus = 'fdc' then 1 else null end) as CertifiedFree , count(case when LunchStatus = 'P' then 1 when LunchStatus = 'fdc' then 1 when LunchStatus = 'R' then 1 when LunchStatus = 'F' then 1 else null end) as Total from students where enroll_status = 0 and schoolid = %param1% 包含utf-8编码的字符串。您可以通过在babel.min.js内添加<meta charset="utf-8">来使您的示例正常工作。