fix: fix some CJS imports
This commit is contained in:
parent
35fa3bdf9f
commit
b295d2b326
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue