feat: convert all files to esm
This commit is contained in:
parent
ef6923ece6
commit
e8fd3a17d2
34 changed files with 202 additions and 228 deletions
|
@ -1,9 +1,9 @@
|
|||
require("dotenv").config();
|
||||
import "dotenv/config";
|
||||
|
||||
const EleventyFetch = require("@11ty/eleventy-fetch");
|
||||
const dayjs = require("dayjs");
|
||||
const utc = require("dayjs/plugin/utc");
|
||||
const relativeTime = require("dayjs/plugin/relativeTime");
|
||||
import EleventyFetch from "@11ty/eleventy-fetch";
|
||||
import dayjs from "dayjs";
|
||||
import utc from "dayjs/plugin/utc.js";
|
||||
import relativeTime from "dayjs/plugin/relativeTime.js";
|
||||
|
||||
dayjs.extend(utc);
|
||||
dayjs.extend(relativeTime);
|
||||
|
@ -87,7 +87,7 @@ const fetchRecentTracks = async () => {
|
|||
return recentTracks;
|
||||
};
|
||||
|
||||
module.exports = async function () {
|
||||
export default async function () {
|
||||
const recentTracks = await fetchRecentTracks();
|
||||
const recentAlbums = await fetchRecentAlbums();
|
||||
|
||||
|
@ -95,4 +95,4 @@ module.exports = async function () {
|
|||
recentTracks,
|
||||
recentAlbums,
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue