Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build issue in dexie-export-import (rollup config) #2117

Merged
merged 2 commits into from
Jan 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions addons/dexie-export-import/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
],
"src": [
"tsc -p src",
"rollup -c tools/build-configs/rollup.config.js"
"rollup -c tools/build-configs/rollup.config.mjs"
],
"test": [
"tsc -p test [--watch 'Watching for file changes.']",
"rollup -c tools/build-configs/rollup.config.js",
"rollup -c tools/build-configs/rollup.tests.config.js"
"rollup -c tools/build-configs/rollup.config.mjs",
"rollup -c tools/build-configs/rollup.tests.config.mjs"
]
},
"author": "[email protected]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@ import path from 'path';
import commonjs from 'rollup-plugin-commonjs';
import nodeResolve from 'rollup-plugin-node-resolve';
import alias from '@rollup/plugin-alias';
import { fileURLToPath } from 'url';

const version = require(path.resolve(__dirname, '../../package.json')).version;
// Define __dirname
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

//const version = require(path.resolve(__dirname, '../../package.json')).version;
const packageJsonPath = new URL('../../package.json', import.meta.url).pathname;
const { version } = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));

const ERRORS_TO_IGNORE = [
"THIS_IS_UNDEFINED",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ import commonjs from 'rollup-plugin-commonjs';
import nodeResolve from 'rollup-plugin-node-resolve';
import path from 'path';
import alias from '@rollup/plugin-alias';
import { fileURLToPath } from 'url';

// Define __dirname
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

const ERRORS_TO_IGNORE = [
"THIS_IS_UNDEFINED"
Expand Down
Loading