Skip to content

Commit

Permalink
Fix release setup
Browse files Browse the repository at this point in the history
  • Loading branch information
sebstryczek committed Jan 6, 2025
1 parent 74c0970 commit 98f6b69
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 6 additions & 13 deletions vite.config-umd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,30 @@ import { defineConfig } from 'vite';

const isProduction = process.env.NODE_ENV === "production";

const plugins = [];

export default defineConfig({
mode: isProduction ? "production" : "development",
build: {
outDir: "build",
minify: isProduction,
sourcemap: !isProduction,
sourcemap: true,
lib: {
// Could also be a dictionary or array of multiple entry points
entry: resolve(__dirname, 'src/maptiler-ar-control.ts'),
name: 'maptilerarcontrol',
// the proper extensions will be added
fileName: (format, entryName) => `${entryName}.${format}.js`,
fileName: (format, entryName) => `${entryName}.${format}.min.js`,
formats: ['umd'],
},

rollupOptions: {
// make sure to externalize deps that shouldn't be bundled
// into your library
// make sure to externalize deps that shouldn't be bundled into your library
external: [
"@maptiler/sdk"
],
output: {
// Provide global variables to use in the UMD build
// for externalized deps
// Provide global variables to use in the UMD build for externalized deps
globals: {
"@maptiler/sdk": "maptilersdk",
},
},
},
},
plugins,
})
plugins: [],
});

0 comments on commit 98f6b69

Please sign in to comment.