1
0
mirror of https://github.com/psychopy/psychojs.git synced 2025-05-10 10:40:54 +00:00
psychojs/vite.config.js
2024-03-15 00:18:39 +00:00

44 lines
1.0 KiB
JavaScript

import glsl from "vite-plugin-glsl"
const fileName = `psychojs-${process.env.npm_package_version}`;
export default {
root: "./src/",
base: "./",
define: {
PSYCHOJS_VERSION: JSON.stringify(process.env.npm_package_version)
},
build:
{
outDir: "../out",
emptyOutDir: true,
sourcemap: true,
minify: false,
cssCodeSplit: true,
lib:
{
name: "psychojs",
fileName,
entry: ["index.js", "index.css"]
},
// rollupOptions:
// {
// // make sure to externalize deps that shouldn't be bundled
// // into your library
// external: ['vue'],
// output:
// {
// // Provide global variables to use in the UMD build
// // for externalized deps
// globals: {
// vue: 'Vue',
// },
// },
// }
},
plugins:
[
glsl()
]
}