Skip to main content
CSS-Tricks
  • Articles
  • Notes
  • Links
  • Guides
  • Almanac
  • Picks
  • Shuffle
Search

Articles Tagged
import

2 Articles
{
,

}
Image
Direct link to the article ECMAScript proposal: JSON modules
import JavaScript javascript modules json

ECMAScript proposal: JSON modules

Dr. Axel Rauschmayer looks at JSON modules, which is already live in Chrome 91 (but nothing else). It looks just like an ES Modules-style import, only you asset the type at the end.

import configData from './config-data.json' assert {type: 
…
Image
Chris Coyier on Jul 21, 2021
Image
Direct link to the article Import Non-ESM libraries in ES Modules, with Client-Side Vanilla JS
es6 import

Import Non-ESM libraries in ES Modules, with Client-Side Vanilla JS

We’re living through a weird era where there are tons of JavaScript libraries that were meant to be used as <script> tags that expose available globals. AND there are tons of JavaScript libraries that are meant to be used through …

Image
Chris Coyier on Sep 7, 2020

CSS-Tricks is powered by DigitalOcean.

Keep up to date on web dev

with our hand-crafted newsletter

DigitalOcean
  • About DO
  • Cloudways
  • Legal stuff
  • Get free credit!
CSS-Tricks
  • Contact
  • Write for CSS-Tricks!
  • Advertise with us
Social
  • RSS Feeds
  • CodePen
  • Mastodon
  • Bluesky
Back to Top
Advertisement