Rollup Setup / Migration
This commit is contained in:
@@ -3,9 +3,6 @@
|
||||
"version": "0.0.0",
|
||||
"main": "index.ts",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"imports": {
|
||||
"#pdfcpu": "./src/wasm/pdfcpu/pdfcpu-wrapper.server.js"
|
||||
},
|
||||
|
||||
@@ -2,7 +2,9 @@ import i18next from "i18next";
|
||||
import resourcesToBackend from "i18next-resources-to-backend";
|
||||
|
||||
i18next
|
||||
.use(resourcesToBackend((language, namespace) => import(`./locales/${namespace}/${language}.json`)))
|
||||
.use(resourcesToBackend((language, namespace) => import(`./public/locales/${namespace}/${language}.json`, {
|
||||
assert: { type: "json" },
|
||||
})))
|
||||
.init({
|
||||
// debug: true,
|
||||
ns: ["common"], // Preload this namespace, no need to add the others, they will load once their module is loaded
|
||||
|
||||
@@ -2,7 +2,7 @@ import { WasmFs } from '@wasmer/wasmfs';
|
||||
import path from "path";
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
let nodeWasmLocation = path.dirname(fileURLToPath(import.meta.url));
|
||||
let nodeWasmLocation = "./dist/public/wasm/pdfcpu/"; // TODO: Replace with __dirname
|
||||
|
||||
let fs;
|
||||
const wasmfs = new WasmFs();
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "Node16",
|
||||
"esModuleInterop": true,
|
||||
"baseUrl": "./src", /* Specify the base directory to resolve non-relative module names. */
|
||||
"paths": {
|
||||
|
||||
Reference in New Issue
Block a user