beanbagdb 0.5.41 → 0.5.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/beanbagdb.esm.js +14 -153143
- package/dist/beanbagdb.esm.js.map +1 -1
- package/package.json +1 -1
- package/rollup.config.js +11 -1
- package/src/index.js +0 -1
- package/src/utils.js +0 -7
package/package.json
CHANGED
package/rollup.config.js
CHANGED
|
@@ -3,6 +3,14 @@ import commonjs from '@rollup/plugin-commonjs';
|
|
|
3
3
|
import json from '@rollup/plugin-json'; // JSON plugin to import package.json
|
|
4
4
|
import replace from '@rollup/plugin-replace';
|
|
5
5
|
import pkg from './package.json' assert { type: "json" }; // Import package.json directly
|
|
6
|
+
import terser from '@rollup/plugin-terser';
|
|
7
|
+
|
|
8
|
+
import { fileURLToPath } from 'url';
|
|
9
|
+
import { dirname } from 'path';
|
|
10
|
+
|
|
11
|
+
// Generate __dirname value for ES modules
|
|
12
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
13
|
+
const __dirname = dirname(__filename);
|
|
6
14
|
|
|
7
15
|
export default [
|
|
8
16
|
// For Node.js (CommonJS and ESM)
|
|
@@ -41,7 +49,9 @@ export default [
|
|
|
41
49
|
replace({
|
|
42
50
|
preventAssignment: true,
|
|
43
51
|
'process.env.PACKAGE_VERSION': JSON.stringify(pkg.version), // Inject version from package.json
|
|
44
|
-
|
|
52
|
+
'__dirname': JSON.stringify(__dirname), // Replace __dirname with the correct value
|
|
53
|
+
}),
|
|
54
|
+
terser(),
|
|
45
55
|
],
|
|
46
56
|
},
|
|
47
57
|
];
|
package/src/index.js
CHANGED
package/src/utils.js
CHANGED
|
@@ -36,10 +36,3 @@ export async function getPackageVersion() {
|
|
|
36
36
|
//}
|
|
37
37
|
return pkg.version
|
|
38
38
|
}
|
|
39
|
-
|
|
40
|
-
// getPackageVersion().then(version => console.log('Package version:', version));
|
|
41
|
-
import { fileURLToPath } from 'url';
|
|
42
|
-
import { dirname } from 'path';
|
|
43
|
-
|
|
44
|
-
export const __filename = fileURLToPath(import.meta.url);
|
|
45
|
-
export const __dirname = dirname(__filename);
|