From b7b1d0829d26f31e3f3f1027710333c2f19c7274 Mon Sep 17 00:00:00 2001 From: Vitaly Date: Sat, 2 Sep 2023 09:32:42 +0300 Subject: [PATCH] cleanup preparedata --- scripts/prepareData.mjs | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/scripts/prepareData.mjs b/scripts/prepareData.mjs index 2953736ca..a8e19ab7c 100644 --- a/scripts/prepareData.mjs +++ b/scripts/prepareData.mjs @@ -36,10 +36,9 @@ for (const [major, versions] of Object.entries(grouped)) { } contents += '})' - build({ + await build({ bundle: true, outfile: `dist/mc-data/${major}.js`, - // entryPoints: ['mcData.js'], stdin: { contents, @@ -47,33 +46,6 @@ for (const [major, versions] of Object.entries(grouped)) { sourcefile: `mcData${major}.js`, loader: 'js', }, - plugins: [ - // { - // name: 'mcData', - // setup (build) { - // build.onResolve({ - // filter: /^mcData\.js$/, - // }, ({ path, pluginData }) => { - // return { - // path, - // namespace: 'mc-data', - // } - // }) - // build.onLoad({ - // filter: /.*/, - // namespace: 'mc-data', - // }, ({ namespace, path }) => { - // const version = path.split('/')[2] - // const data = versions[version] - // if (!data) throw new Error(`No data for ${version}`) - // return { - // contents: `export const data = ${JSON.stringify(data, null, 2)}`, - // loader: 'js', - // } - // }) - // } - // } - ], }) } console.log('data prepared')