soundfonts build

This commit is contained in:
Felix Roos
2023-01-28 23:04:30 +01:00
parent cb7156b091
commit fddbb2e2ac
3 changed files with 30 additions and 1 deletions
+9 -1
View File
@@ -3,6 +3,13 @@
"version": "0.5.0",
"description": "Soundsfont support for strudel",
"main": "index.mjs",
"publishConfig": {
"main": "dist/index.js",
"module": "dist/index.mjs"
},
"scripts": {
"build": "vite build"
},
"type": "module",
"repository": {
"type": "git",
@@ -28,6 +35,7 @@
"soundfont2": "^0.4.0"
},
"devDependencies": {
"node-fetch": "^3.2.6"
"node-fetch": "^3.2.6",
"vite": "^3.2.2"
}
}
+19
View File
@@ -0,0 +1,19 @@
import { defineConfig } from 'vite';
import { dependencies } from './package.json';
import { resolve } from 'path';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [],
build: {
lib: {
entry: resolve(__dirname, 'index.mjs'),
formats: ['es', 'cjs'],
fileName: (ext) => ({ es: 'index.mjs', cjs: 'index.js' }[ext]),
},
rollupOptions: {
external: [...Object.keys(dependencies)],
},
target: 'esnext',
},
});