From 64a627a4581661c40e0aec5933a59d3e30d291b0 Mon Sep 17 00:00:00 2001 From: Joost De Cock Date: Sat, 27 Aug 2022 13:27:33 +0200 Subject: [PATCH] chore: Migrated build script template to v3 --- config/templates/build.dflt.mjs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/config/templates/build.dflt.mjs b/config/templates/build.dflt.mjs index 9d1da1994da..67aa3bb390f 100644 --- a/config/templates/build.dflt.mjs +++ b/config/templates/build.dflt.mjs @@ -1,20 +1,20 @@ /* This script will build the package with esbuild */ import esbuild from 'esbuild' -import pkg from './package.json' assert { type: 'json' } +import { version, name, description, author, license } from './package.json' assert { type: 'json' } // Create banner based on package info const banner = `/** - * ${pkg.name} | v${pkg.version} - * ${pkg.description} - * (c) ${new Date().getFullYear()} ${pkg.author} - * @license ${pkg.license} + * ${name} | v${version} + * ${description} + * (c) ${new Date().getFullYear()} ${author} + * @license ${license} */` // Shared esbuild options const options = { banner: { js: banner }, bundle: true, - entryPoints: ['src/index.js'], + entryPoints: ['src/index.mjs'], format: 'esm', outfile: 'dist/index.mjs', external: ["@freesewing"],