Skip to content

Commit

Permalink
fix: JSON import warning javítva
Browse files Browse the repository at this point in the history
  • Loading branch information
juzraai committed Jan 20, 2024
1 parent 38b43e1 commit 94131b8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import fs from 'fs';
import esbuild from 'esbuild';

const packageJson = JSON.parse(fs.readFileSync('package.json', 'utf8'));
// reading instead of importing is intentional here

const OUTPUT_FILE = 'dist/dijnet-bot.cjs';

Expand Down
2 changes: 1 addition & 1 deletion src/logger.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fs from 'fs';
import kleur from 'kleur';
import packageJson from '../package.json' assert { type: 'json' };
import packageJson from './packageJson.cjs';
import Config from './config.js';

function getTimestamp() {
Expand Down
1 change: 1 addition & 0 deletions src/packageJson.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('../package.json');

0 comments on commit 94131b8

Please sign in to comment.