Work on attachments

This commit is contained in:
N-Pex 2025-06-09 09:44:37 +02:00
parent ec79a33eab
commit 842c87dc96
28 changed files with 2714 additions and 798 deletions

View file

@ -3,34 +3,16 @@ import vue from "@vitejs/plugin-vue";
import vueJsx from "@vitejs/plugin-vue-jsx";
import vitePluginVuetify from "vite-plugin-vuetify";
import { fileURLToPath, URL } from "node:url";
import Components from "unplugin-vue-components/vite";
import { viteStaticCopy } from 'vite-plugin-static-copy';
import nodePolyfills from 'rollup-plugin-polyfill-node';
import { resolve } from "path";
import commonjs from '@rollup/plugin-commonjs';
function VuetifyResolver() {
return {
type: 'component',
resolve: (name) => {
console.log("rESOLVE", name);
if (name.match(/^V[A-Z]/) && !name.includes("VEmojiPicker"))
return { name, from: './node_modules/vuetify/components' }
},
}
}
import wasm from "vite-plugin-wasm";
import topLevelAwait from "vite-plugin-top-level-await";
// https://vitejs.dev/config/
export default defineConfig(({mode}) => ({
base: "./",
plugins: [
// commonjs({
// include: /node_modules/,
// requireReturnsDefault: 'auto', // <---- this solves default issue
// }),
// commonjs({
// exclude: ["*vuex-persist*", "*deepmerge*"]
// }),
wasm(),
topLevelAwait(),
vue({
template: {
compilerOptions: {
@ -40,9 +22,6 @@ export default defineConfig(({mode}) => ({
}),
vueJsx(),
vitePluginVuetify(),
// Components({
// resolvers: [VuetifyResolver()],
// }),
viteStaticCopy({
targets: [
{
@ -68,54 +47,8 @@ export default defineConfig(({mode}) => ({
{ find: "~@", replacement: fileURLToPath(new URL("./src", import.meta.url)) },
{ find: "vue", replacement: fileURLToPath(new URL("./node_modules/vue/dist/vue.esm-bundler.js", import.meta.url)) },
],
},
define: {
//global: "window",
//module: {},
Lame: "window.Lame",
Presets: "window.Presets",
GainAnalysis: "window.GainAnalysis",
QuantizePVT: "window.QuantizePVT",
Quantize: "window.Quantize",
Takehiro: "window.Takehiro",
Reservoir: "window.Reservoir",
MPEGMode: "window.MPEGMode",
BitStream: "window.BitStream",
},
build: {
commonjsOptions: { transformMixedEsModules: true } // Change
commonjsOptions: { transformMixedEsModules: true }
}
// optimizeDeps: {
// include: ["deepmerge", "vuex-persist"],
// },
// optimizeDeps: {
// include: [
// "vuex-persist", "vue-sanitize"
// ],
// esbuildOptions:{
// plugins:[
// commonjs()
// ]
// }
// },
// build: {
// commonjsOptions: {
// include: [/node_modules/],
// requireReturnsDefault: true,
// exclude: ["vuex-persist"]
// }
// },
// rollupOptions: {
// //Here, we are externalizing Vue to prevent it to be bundled
// //with our library
// external: ["vue"],
// //Add this so the UMD build will recognize the global variables
// //of externalized dependencies
// output: {
// globals: {
// vue: "Vue",
// },
// exports: "named",
// },
// },
}));