Open 3r1d opened 2 years ago
I tried to use the lib without npm, by copying the moment-business.js file, and source it with: <script src="moment-business.js"></script>
<script src="moment-business.js"></script>
then use it with import business from 'moment-business';
import business from 'moment-business';
but I got error below: Uncaught SyntaxError: Cannot use import statement outside a module
Uncaught SyntaxError: Cannot use import statement outside a module
Any idea how to solve this ?
This is most likely late, but for someone experiencing this issue, try: <script type="module" src="moment-business.js"></script>
<script type="module" src="moment-business.js"></script>
I tried to use the lib without npm, by copying the moment-business.js file, and source it with:
<script src="moment-business.js"></script>
then use it with
import business from 'moment-business';
but I got error below:
Uncaught SyntaxError: Cannot use import statement outside a module
Any idea how to solve this ?