mirror of
https://github.com/eliasstepanik/strudel.git
synced 2026-01-13 14:48:32 +00:00
add webaudio cjs + esm build task
This commit is contained in:
parent
3ec2fc6030
commit
431e1b87bd
@ -2,13 +2,16 @@
|
||||
"name": "@strudel.cycles/webaudio",
|
||||
"version": "0.3.2",
|
||||
"description": "Web Audio helpers for Strudel",
|
||||
"main": "index.mjs",
|
||||
"main": "dist/index.cjs.mjs",
|
||||
"module": "dist/index.es.js",
|
||||
"type": "module",
|
||||
"directories": {
|
||||
"example": "examples"
|
||||
},
|
||||
"scripts": {
|
||||
"example": "npx parcel examples/repl.html"
|
||||
"example": "npx parcel examples/repl.html",
|
||||
"build": "vite build",
|
||||
"prepublish": "npm run build"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
19
packages/webaudio/vite.config.js
Normal file
19
packages/webaudio/vite.config.js
Normal 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) => `index.${ext}.js`,
|
||||
},
|
||||
rollupOptions: {
|
||||
external: [...Object.keys(dependencies)],
|
||||
},
|
||||
target: 'esnext',
|
||||
},
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user