Skip to content

Commit

Permalink
fix: Try to fix binary build
Browse files Browse the repository at this point in the history
  • Loading branch information
3y3 committed Apr 2, 2024
1 parent 1f971cc commit 73a860f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"schemas",
"src"
],
"imports": {
"#package": "./package.json"
"exports": {
"package": "./package.json"
},
"scripts": {
"build": "node scripts/build.cli.js",
Expand Down
2 changes: 1 addition & 1 deletion scripts/build.cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Promise.all(builds.map(([entries, outfile]) => {

currentConfig.external = [
...Object.keys(dependencies),
'#package',
'package',
];

return esbuild.build(currentConfig);
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/translate/utils/fs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {dirname, join} from 'node:path';
import {readFile, writeFile} from 'node:fs/promises';
import {dump, load} from 'js-yaml';

const ROOT = dirname(require.resolve('#package'));
const ROOT = dirname(require.resolve('@diplodoc/cli/package'));

function last<T>(array: T[]): T | undefined {
return array[array.length - 1];
Expand Down

0 comments on commit 73a860f

Please sign in to comment.