fix: fix some CJS imports

This commit is contained in:
Nolan Lawson 2021-07-04 16:53:31 -07:00
parent 35fa3bdf9f
commit b295d2b326
2 changed files with 6 additions and 2 deletions

View File

@ -3,7 +3,9 @@ import path from 'path'
import fs from 'fs'
import { promisify } from 'util'
import { optimize } from 'svgo'
import $ from 'cheerio'
import cheerioPackage from 'cheerio'
const { default: $ } = cheerioPackage
const __dirname = path.dirname(new URL(import.meta.url).pathname)
const readFile = promisify(fs.readFile)

View File

@ -9,7 +9,9 @@ import { performance } from 'perf_hooks'
import { debounce } from '../src/routes/_thirdparty/lodash/timers.js'
import applyIntl from '../webpack/svelte-intl-loader.js'
import { LOCALE } from '../src/routes/_static/intl.js'
import { getLangDir } from 'rtl-detect'
import rtlDetectPackage from 'rtl-detect'
const { getLangDir } = rtlDetectPackage
const __dirname = path.dirname(new URL(import.meta.url).pathname)
const writeFile = promisify(fs.writeFile)