Skip to content

Commit

Permalink
fix: silence Vite CJS warning by using ESM format for JS imports
Browse files Browse the repository at this point in the history
  • Loading branch information
aqandrew committed Oct 3, 2024
1 parent 26599df commit e25aa13
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"engines": {
"node": "18.x"
},
"type": "module",
"homepage": "https://edwinjue.github.io/311-data-v2-gh-pages",
"scripts": {
"predeploy": "npm run build",
Expand Down
8 changes: 5 additions & 3 deletions utils/checkEnv.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
// Checks to see if .env has all keys in .example.env. Any missing keys will be copied.
// If no .env file is found, one is created from .example.env.

const fs = require('fs');
const path = require('path');
const dotenv = require('dotenv');
import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
import dotenv from 'dotenv';

const __dirname = path.dirname(fileURLToPath(import.meta.url));
const red = '\x1b[31m%s\x1b[0m';
const green = '\x1b[32m%s\x1b[0m';
const vitePrefix = 'VITE_';
Expand Down

0 comments on commit e25aa13

Please sign in to comment.