From 1c1c780e7b854f59c4a280c06c532bdc5fe851d6 Mon Sep 17 00:00:00 2001 From: Andrey Sitnik Date: Mon, 11 Sep 2017 14:33:02 +1000 Subject: [PATCH] Use ES5 export in data --- scripts/build-data.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/build-data.js b/scripts/build-data.js index bf60617..2ba6ae4 100644 --- a/scripts/build-data.js +++ b/scripts/build-data.js @@ -141,8 +141,8 @@ flags.emojis.sort() mkdirp('data', (err) => { if (err) throw err - const stringifiedData = JSON.stringify(data).replace(/\"([A-Za-z_]+)\":/g, '$1:') - fs.writeFile('data/index.js', `export default ${stringifiedData}`, (err) => { + const stringified = JSON.stringify(data).replace(/\"([A-Za-z_]+)\":/g, '$1:') + fs.writeFile('data/index.js', `module.exports = ${stringified}`, (err) => { if (err) throw err }) })