File tree Expand file tree Collapse file tree 3 files changed +16
-4
lines changed
addons/dexie-export-import Expand file tree Collapse file tree 3 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 24
24
],
25
25
"src" : [
26
26
" tsc -p src" ,
27
- " rollup -c tools/build-configs/rollup.config.js "
27
+ " rollup -c tools/build-configs/rollup.config.mjs "
28
28
],
29
29
"test" : [
30
30
" tsc -p test [--watch 'Watching for file changes.']" ,
31
- " rollup -c tools/build-configs/rollup.config.js " ,
32
- " rollup -c tools/build-configs/rollup.tests.config.js "
31
+ " rollup -c tools/build-configs/rollup.config.mjs " ,
32
+ " rollup -c tools/build-configs/rollup.tests.config.mjs "
33
33
]
34
34
},
35
35
Original file line number Diff line number Diff line change @@ -4,8 +4,15 @@ import path from 'path';
4
4
import commonjs from 'rollup-plugin-commonjs' ;
5
5
import nodeResolve from 'rollup-plugin-node-resolve' ;
6
6
import alias from '@rollup/plugin-alias' ;
7
+ import { fileURLToPath } from 'url' ;
7
8
8
- const version = require ( path . resolve ( __dirname , '../../package.json' ) ) . version ;
9
+ // Define __dirname
10
+ const __filename = fileURLToPath ( import . meta. url ) ;
11
+ const __dirname = path . dirname ( __filename ) ;
12
+
13
+ //const version = require(path.resolve(__dirname, '../../package.json')).version;
14
+ const packageJsonPath = new URL ( '../../package.json' , import . meta. url ) . pathname ;
15
+ const { version } = JSON . parse ( readFileSync ( packageJsonPath , 'utf-8' ) ) ;
9
16
10
17
const ERRORS_TO_IGNORE = [
11
18
"THIS_IS_UNDEFINED" ,
Original file line number Diff line number Diff line change @@ -3,6 +3,11 @@ import commonjs from 'rollup-plugin-commonjs';
3
3
import nodeResolve from 'rollup-plugin-node-resolve' ;
4
4
import path from 'path' ;
5
5
import alias from '@rollup/plugin-alias' ;
6
+ import { fileURLToPath } from 'url' ;
7
+
8
+ // Define __dirname
9
+ const __filename = fileURLToPath ( import . meta. url ) ;
10
+ const __dirname = path . dirname ( __filename ) ;
6
11
7
12
const ERRORS_TO_IGNORE = [
8
13
"THIS_IS_UNDEFINED"
You can’t perform that action at this time.
0 commit comments