Skip to content

Commit

Permalink
Use native import.meta.resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
Siilwyn committed Mar 25, 2024
1 parent 5a5c7ba commit cc0c678
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/property-scraper.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import fs from 'node:fs/promises';

const { css } = await import.meta.resolve('@mdn/browser-compat-data')
.then((moduleResolution) => new URL(moduleResolution).pathname)
.then(fs.readFile)
const { css } = await fs.readFile(new URL(import.meta.resolve('@mdn/browser-compat-data')))
.then(JSON.parse);

const isStandardProperty = (name) => (property) => Boolean(
Expand Down

0 comments on commit cc0c678

Please sign in to comment.