mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
Avoid import.meta.dirname to be backwards compatible to Node.js 18+ (#1058)
This commit is contained in:
@@ -18,10 +18,12 @@
|
||||
// limitations under the License.
|
||||
|
||||
import { copyFileSync, existsSync, mkdirSync } from 'fs';
|
||||
import { join, basename } from 'path';
|
||||
import { dirname, join, basename } from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { glob } from 'glob';
|
||||
|
||||
const root = join(import.meta.dirname, '..');
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
const root = join(__dirname, '..');
|
||||
const bundleDir = join(root, 'bundle');
|
||||
|
||||
// Create the bundle directory if it doesn't exist
|
||||
|
||||
Reference in New Issue
Block a user