can not add script tag to index.html in react-script project -
i create project react-script.
i add weixin js-sdk public/index.html head tag.
<head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="shortcut icon" href="%public_url%/favicon.ico"> <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js?v=1"></script> <!-- notice use of %public_url% in tag above. replaced url of `public` folder during build. files inside `public` folder can referenced html. unlike "/favicon.ico" or "favicon.ico", "%public_url%/favicon.ico" work correctly both client-side routing , non-root public url. learn how configure non-root public url running `npm run build`. --> <title>react app</title>
but got error: error 'wx' not defined
Comments
Post a Comment