add vite-plugin-bundle-audioworklet and use it both from website and superdough
This commit is contained in:
parent
7bec92ca99
commit
fdbbcd2dd2
7 changed files with 44 additions and 8 deletions
|
|
@ -32,7 +32,8 @@
|
|||
},
|
||||
"homepage": "https://github.com/tidalcycles/strudel#readme",
|
||||
"devDependencies": {
|
||||
"vite": "^6.0.11"
|
||||
"vite": "^6.0.11",
|
||||
"vite-plugin-bundle-audioworklet": "workspace:*"
|
||||
},
|
||||
"dependencies": {
|
||||
"nanostores": "^0.11.3"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { defineConfig } from 'vite';
|
||||
import { dependencies } from './package.json';
|
||||
import { resolve } from 'path';
|
||||
import { bundleAudioWorkletPlugin } from './vite-plugin-bundle-audioworklet';
|
||||
import bundleAudioWorkletPlugin from 'vite-plugin-bundle-audioworklet';
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
|
|
|
|||
19
packages/vite-plugin-bundle-audioworklet/package.json
Normal file
19
packages/vite-plugin-bundle-audioworklet/package.json
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"name": "vite-plugin-bundle-audioworklet",
|
||||
"main": "./vite-plugin-bundle-audioworklet.js",
|
||||
"version": "0.1.0",
|
||||
"description": "",
|
||||
"keywords": [
|
||||
"tidalcycles",
|
||||
"strudel",
|
||||
"pattern",
|
||||
"livecoding",
|
||||
"algorave"
|
||||
],
|
||||
"author": "Felix Roos <flix91@gmail.com>",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"type": "module",
|
||||
"devDependencies": {
|
||||
"vite": "^6.0.11"
|
||||
}
|
||||
}
|
||||
|
|
@ -2,12 +2,12 @@ import { createLogger, build } from 'vite';
|
|||
|
||||
const end = '?audioworklet';
|
||||
|
||||
export function bundleAudioWorkletPlugin() /* : PluginOption */ {
|
||||
function bundleAudioWorkletPlugin() /* : PluginOption */ {
|
||||
let viteConfig /* : UserConfig */;
|
||||
|
||||
return {
|
||||
name: 'vite-plugin-bundle-audioworklet',
|
||||
apply: 'build',
|
||||
/* apply: 'build', */
|
||||
enforce: 'post',
|
||||
|
||||
config(config) {
|
||||
|
|
@ -44,3 +44,5 @@ export function bundleAudioWorkletPlugin() /* : PluginOption */ {
|
|||
},
|
||||
};
|
||||
}
|
||||
|
||||
export default bundleAudioWorkletPlugin;
|
||||
Loading…
Add table
Add a link
Reference in a new issue