From 30b122f57c1f407b64cfe0678b3eec0424aa51ec Mon Sep 17 00:00:00 2001 From: Florian Michaut Date: Thu, 21 Nov 2024 16:00:52 +0100 Subject: [PATCH] fix(): use esm import since upgrade to V3 --- src/_data/global.js | 2 +- src/_data/helpers.js | 2 +- src/_data/styleguide.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/_data/global.js b/src/_data/global.js index 683a0a3..5852884 100644 --- a/src/_data/global.js +++ b/src/_data/global.js @@ -1,4 +1,4 @@ -module.exports = { +export default { random() { const segment = () => { return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1); diff --git a/src/_data/helpers.js b/src/_data/helpers.js index 9ae9b78..c1a8429 100644 --- a/src/_data/helpers.js +++ b/src/_data/helpers.js @@ -1,4 +1,4 @@ -module.exports = { +export default { getNextHeadingLevel(currentLevel) { return parseInt(currentLevel, 10) + 1; }, diff --git a/src/_data/styleguide.js b/src/_data/styleguide.js index 4969bec..2a5e996 100644 --- a/src/_data/styleguide.js +++ b/src/_data/styleguide.js @@ -1,6 +1,6 @@ -const tokens = require('./tokens.json'); +import tokens from './tokens.json' with { type: "json" }; -module.exports = { +export default { colors() { let response = [];