(All feedback/discussion should take place in the relevant issue.)
There's multiple requests for the ability to control a type at a much more fine grained level:
(All feedback/discussion should take place in the relevant issue.)
There's multiple requests for the ability to control a type at a much more fine grained level:
module/nomodule JS code (including the Safari hack)<script type="module" src="module.js"></script>
<script nomodule src="nomodule.js"></script>
Update September 2020: life's almost good. Edge Chromium is widely rolled out, and Safari 14.0 ships soon with a fix.
Test page: https://jg-testpage.github.io/es-modules/module-nomodule/
| const ACCESS_TOKEN = "token"; | |
| const FILE_ID = "fileId"; | |
| const NODE_ID = "Check the url for something like => 3%3A2"; | |
| const container = document.getElementById("figma-container") | |
| function apiRequest(url) { | |
| return fetch(url, { | |
| method: 'GET', | |
| headers: { "x-figma-token": ACCESS_TOKEN } | |
| }).then(function(response) { |
The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.
This means you have the following choices:
import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.await import(…) from CommonJS instead of require(…).