mirror of
https://github.com/lucide-icons/lucide.git
synced 2025-12-23 03:09:24 +01:00
* feat: added dpi preview * fix: switched to resvg * build: updated versions and nitro build config * fix: switched to resvg-wasm * fix: trying out fetch with import meta url * fix: trying out copy wasm file manually * fix: wrong file path * fix: trying out esmImport * fix: oups * fix: giving up * fix: await initialization * fix: still nothing * Revert "fix: still nothing" This reverts commit dcb9fe3837a32ec4149f41c9b8925ae0e2fbdb79. * fix: implement suggestions Co-authored-by: Eric Fennis <eric.fennis@gmail.com> * Update .github/workflows/pull-request.yml * Update .github/workflows/pull-request.yml * Update .github/workflows/pull-request.yml * Update .github/workflows/pull-request.yml * Update .github/workflows/pull-request.yml * Update .github/workflows/pull-request.yml * Update .github/workflows/pull-request.yml * Update .github/workflows/pull-request.yml * Update .github/workflows/pull-request.yml --------- Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
16 lines
321 B
TypeScript
16 lines
321 B
TypeScript
import fs from 'fs';
|
|
import module from 'node:module';
|
|
/* WASM_IMPORT */
|
|
|
|
let wasm;
|
|
|
|
if (process.env.NODE_ENV === 'development') {
|
|
const require = module.createRequire(import.meta.url);
|
|
|
|
wasm = fs.readFileSync(require.resolve('@resvg/resvg-wasm/index_bg.wasm'));
|
|
} else {
|
|
wasm = resvg_wasm;
|
|
}
|
|
|
|
export default wasm;
|