mirror of
https://github.com/eliasstepanik/strudel.git
synced 2026-01-11 05:38:35 +00:00
add vite-plugin-bundle-audioworklet and use it both from website and superdough
This commit is contained in:
parent
7bec92ca99
commit
fdbbcd2dd2
@ -32,7 +32,8 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/tidalcycles/strudel#readme",
|
"homepage": "https://github.com/tidalcycles/strudel#readme",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"vite": "^6.0.11"
|
"vite": "^6.0.11",
|
||||||
|
"vite-plugin-bundle-audioworklet": "workspace:*"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"nanostores": "^0.11.3"
|
"nanostores": "^0.11.3"
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { defineConfig } from 'vite';
|
import { defineConfig } from 'vite';
|
||||||
import { dependencies } from './package.json';
|
import { dependencies } from './package.json';
|
||||||
import { resolve } from 'path';
|
import { resolve } from 'path';
|
||||||
import { bundleAudioWorkletPlugin } from './vite-plugin-bundle-audioworklet';
|
import bundleAudioWorkletPlugin from 'vite-plugin-bundle-audioworklet';
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
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';
|
const end = '?audioworklet';
|
||||||
|
|
||||||
export function bundleAudioWorkletPlugin() /* : PluginOption */ {
|
function bundleAudioWorkletPlugin() /* : PluginOption */ {
|
||||||
let viteConfig /* : UserConfig */;
|
let viteConfig /* : UserConfig */;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name: 'vite-plugin-bundle-audioworklet',
|
name: 'vite-plugin-bundle-audioworklet',
|
||||||
apply: 'build',
|
/* apply: 'build', */
|
||||||
enforce: 'post',
|
enforce: 'post',
|
||||||
|
|
||||||
config(config) {
|
config(config) {
|
||||||
@ -44,3 +44,5 @@ export function bundleAudioWorkletPlugin() /* : PluginOption */ {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default bundleAudioWorkletPlugin;
|
||||||
17
pnpm-lock.yaml
generated
17
pnpm-lock.yaml
generated
@ -41,7 +41,7 @@ importers:
|
|||||||
version: 2.2.7
|
version: 2.2.7
|
||||||
'@vitest/coverage-v8':
|
'@vitest/coverage-v8':
|
||||||
specifier: 3.0.4
|
specifier: 3.0.4
|
||||||
version: 3.0.4(vitest@3.0.4(@types/debug@4.1.12)(@types/node@22.10.10)(@vitest/ui@3.0.4)(jiti@2.4.2)(lightningcss@1.29.1)(terser@5.37.0)(yaml@2.7.0))
|
version: 3.0.4(vitest@3.0.4)
|
||||||
'@vitest/ui':
|
'@vitest/ui':
|
||||||
specifier: ^3.0.4
|
specifier: ^3.0.4
|
||||||
version: 3.0.4(vitest@3.0.4)
|
version: 3.0.4(vitest@3.0.4)
|
||||||
@ -476,6 +476,9 @@ importers:
|
|||||||
vite:
|
vite:
|
||||||
specifier: ^6.0.11
|
specifier: ^6.0.11
|
||||||
version: 6.0.11(@types/node@22.10.10)(jiti@2.4.2)(lightningcss@1.29.1)(terser@5.37.0)(yaml@2.7.0)
|
version: 6.0.11(@types/node@22.10.10)(jiti@2.4.2)(lightningcss@1.29.1)(terser@5.37.0)(yaml@2.7.0)
|
||||||
|
vite-plugin-bundle-audioworklet:
|
||||||
|
specifier: workspace:*
|
||||||
|
version: link:../vite-plugin-bundle-audioworklet
|
||||||
|
|
||||||
packages/tidal:
|
packages/tidal:
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -540,6 +543,12 @@ importers:
|
|||||||
specifier: ^3.0.4
|
specifier: ^3.0.4
|
||||||
version: 3.0.4(@types/debug@4.1.12)(@types/node@22.10.10)(@vitest/ui@3.0.4)(jiti@2.4.2)(lightningcss@1.29.1)(terser@5.37.0)(yaml@2.7.0)
|
version: 3.0.4(@types/debug@4.1.12)(@types/node@22.10.10)(@vitest/ui@3.0.4)(jiti@2.4.2)(lightningcss@1.29.1)(terser@5.37.0)(yaml@2.7.0)
|
||||||
|
|
||||||
|
packages/vite-plugin-bundle-audioworklet:
|
||||||
|
devDependencies:
|
||||||
|
vite:
|
||||||
|
specifier: ^6.0.11
|
||||||
|
version: 6.0.11(@types/node@22.10.10)(jiti@2.4.2)(lightningcss@1.29.1)(terser@5.37.0)(yaml@2.7.0)
|
||||||
|
|
||||||
packages/web:
|
packages/web:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@strudel/core':
|
'@strudel/core':
|
||||||
@ -780,6 +789,9 @@ importers:
|
|||||||
sharp:
|
sharp:
|
||||||
specifier: ^0.33.5
|
specifier: ^0.33.5
|
||||||
version: 0.33.5
|
version: 0.33.5
|
||||||
|
vite-plugin-bundle-audioworklet:
|
||||||
|
specifier: workspace:*
|
||||||
|
version: link:../packages/vite-plugin-bundle-audioworklet
|
||||||
workbox-window:
|
workbox-window:
|
||||||
specifier: ^7.3.0
|
specifier: ^7.3.0
|
||||||
version: 7.3.0
|
version: 7.3.0
|
||||||
@ -7561,7 +7573,6 @@ packages:
|
|||||||
|
|
||||||
workbox-google-analytics@7.0.0:
|
workbox-google-analytics@7.0.0:
|
||||||
resolution: {integrity: sha512-MEYM1JTn/qiC3DbpvP2BVhyIH+dV/5BjHk756u9VbwuAhu0QHyKscTnisQuz21lfRpOwiS9z4XdqeVAKol0bzg==}
|
resolution: {integrity: sha512-MEYM1JTn/qiC3DbpvP2BVhyIH+dV/5BjHk756u9VbwuAhu0QHyKscTnisQuz21lfRpOwiS9z4XdqeVAKol0bzg==}
|
||||||
deprecated: It is not compatible with newer versions of GA starting with v4, as long as you are using GAv3 it should be ok, but the package is not longer being maintained
|
|
||||||
|
|
||||||
workbox-navigation-preload@7.0.0:
|
workbox-navigation-preload@7.0.0:
|
||||||
resolution: {integrity: sha512-juWCSrxo/fiMz3RsvDspeSLGmbgC0U9tKqcUPZBCf35s64wlaLXyn2KdHHXVQrb2cqF7I0Hc9siQalainmnXJA==}
|
resolution: {integrity: sha512-juWCSrxo/fiMz3RsvDspeSLGmbgC0U9tKqcUPZBCf35s64wlaLXyn2KdHHXVQrb2cqF7I0Hc9siQalainmnXJA==}
|
||||||
@ -10248,7 +10259,7 @@ snapshots:
|
|||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
'@vitest/coverage-v8@3.0.4(vitest@3.0.4(@types/debug@4.1.12)(@types/node@22.10.10)(@vitest/ui@3.0.4)(jiti@2.4.2)(lightningcss@1.29.1)(terser@5.37.0)(yaml@2.7.0))':
|
'@vitest/coverage-v8@3.0.4(vitest@3.0.4)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@ampproject/remapping': 2.3.0
|
'@ampproject/remapping': 2.3.0
|
||||||
'@bcoe/v8-coverage': 1.0.2
|
'@bcoe/v8-coverage': 1.0.2
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import remarkToc from 'remark-toc';
|
|||||||
import rehypeSlug from 'rehype-slug';
|
import rehypeSlug from 'rehype-slug';
|
||||||
import rehypeAutolinkHeadings from 'rehype-autolink-headings';
|
import rehypeAutolinkHeadings from 'rehype-autolink-headings';
|
||||||
import rehypeUrls from 'rehype-urls';
|
import rehypeUrls from 'rehype-urls';
|
||||||
|
import bundleAudioWorkletPlugin from 'vite-plugin-bundle-audioworklet';
|
||||||
|
|
||||||
import tailwind from '@astrojs/tailwind';
|
import tailwind from '@astrojs/tailwind';
|
||||||
import AstroPWA from '@vite-pwa/astro';
|
import AstroPWA from '@vite-pwa/astro';
|
||||||
@ -134,6 +135,7 @@ export default defineConfig({
|
|||||||
site,
|
site,
|
||||||
base,
|
base,
|
||||||
vite: {
|
vite: {
|
||||||
|
plugins: [bundleAudioWorkletPlugin()],
|
||||||
ssr: {
|
ssr: {
|
||||||
// Example: Force a broken package to skip SSR processing, if needed
|
// Example: Force a broken package to skip SSR processing, if needed
|
||||||
// external: ['fraction.js'], // https://github.com/infusion/Fraction.js/issues/51
|
// external: ['fraction.js'], // https://github.com/infusion/Fraction.js/issues/51
|
||||||
|
|||||||
@ -73,6 +73,7 @@
|
|||||||
"@vite-pwa/astro": "^0.5.0",
|
"@vite-pwa/astro": "^0.5.0",
|
||||||
"html-escaper": "^3.0.3",
|
"html-escaper": "^3.0.3",
|
||||||
"sharp": "^0.33.5",
|
"sharp": "^0.33.5",
|
||||||
"workbox-window": "^7.3.0"
|
"workbox-window": "^7.3.0",
|
||||||
|
"vite-plugin-bundle-audioworklet": "workspace:*"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user