diff --git a/build/emoji.js b/build/emoji.js index 10610c57a..22e966ccc 100644 --- a/build/emoji.js +++ b/build/emoji.js @@ -67,7 +67,11 @@ function writeEmojiJS(emojiData) { const emojiJS = fs.existsSync(filePaths.emojiJS) && fs.readFileSync(filePaths.emojiJS, 'utf8'); - const newEmojiJS = `export default ${JSON.stringify(emojiData, {}, 2)}`; + const newEmojiJS = `export const emojifyData = ${JSON.stringify( + emojiData, + {}, + 2 + )}`; if (!emojiJS || emojiJS !== newEmojiJS) { fs.writeFileSync(filePaths.emojiJS, newEmojiJS); diff --git a/src/core/render/emojify-data.js b/src/core/render/emojify-data.js index 22b23cab6..eb7410f44 100644 --- a/src/core/render/emojify-data.js +++ b/src/core/render/emojify-data.js @@ -1,4 +1,4 @@ -export default { +export const emojifyData = { baseURL: 'https://github.githubassets.com/images/icons/emoji/', data: { 100: 'unicode/1f4af.png?v8', diff --git a/src/core/render/emojify.js b/src/core/render/emojify.js index f5e619d30..3f4401035 100644 --- a/src/core/render/emojify.js +++ b/src/core/render/emojify.js @@ -1,7 +1,7 @@ -import emojiData from './emojify-data.js'; +import { emojifyData } from './emojify-data.js'; function replaceEmojiShorthand(m, $1, useNativeEmoji) { - const emojiMatch = emojiData.data[$1]; + const emojiMatch = emojifyData.data[$1]; let result = m; @@ -18,7 +18,7 @@ function replaceEmojiShorthand(m, $1, useNativeEmoji) { .concat('︎'); result = `${emojiUnicode}`; } else { - result = `${$1}`; + result = `${$1}`; } }