I have an ES6 React application that has been compiled and added via a browser.
I have several import statements, for example:
import React from 'react/addons'
I also need to use an external library that creates an HTML widget hosted on a CDN. I tried to include the file before or after the package source:
<script src="//cdn.auth0.com/js/lock-7.9.min.js"></script> <script type="text/javascript" src="scripts/build.js"></script>
When I try to reference the provided CDN object in the console, it works fine:
Auth0Lock <-function Auth0Lock()...
Linking to it in a React application causes a syntax error. I guess I need to import this ... but how?
source share