From d4d6b1d05426a90a2a8a49ca0f538fc3b5864b9b Mon Sep 17 00:00:00 2001 From: Kevin Chappell Date: Sun, 20 Oct 2024 13:44:23 -0700 Subject: [PATCH] chore: update build only output a UMD until someone asks for other formats BREAKING CHANGE: updates the build type --- .github/workflows/publish.yaml | 1 + .github/workflows/pull-request.yml | 1 + vite.config.js | 5 +++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 090bc7b..ff1e2a3 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -12,6 +12,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: + cache: 'npm' node-version: 23 - name: Install dependencies env: diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index aa3d9b6..f6595f3 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -8,6 +8,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: + cache: 'npm' node-version: 23 - name: Install dependencies env: diff --git a/vite.config.js b/vite.config.js index 20e7369..fa786df 100644 --- a/vite.config.js +++ b/vite.config.js @@ -44,8 +44,8 @@ const libConfig = { lib: { entry: 'src/lib/js/index.js', name: 'Formeo', - fileName: format => `formeo.${format}.min.js`, - formats: ['es', 'cjs', 'umd', 'iife'], + fileName: () => 'formeo.min.js', + formats: ['umd'], outDir: resolve(__dirname, 'dist'), }, minify: 'terser', @@ -70,6 +70,7 @@ const libConfig = { const demoConfig = { ...sharedConfig, root: 'src/demo', + base: '', resolve: { alias: { 'formeo': resolve(__dirname, 'src/lib/js/index.js'),