-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathvite.config.tiny.js
32 lines (30 loc) · 1002 Bytes
/
vite.config.tiny.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { defineConfig } from "vite";
import path from "path";
const dirSrc = `${__dirname}/src`;
export default defineConfig({
define: {
__TINY__: true,
},
base: "./",
build: {
lib: {
entry: path.resolve( `${dirSrc}/tiny-player/efflux-tiny-player.ts` ),
name: "eTiny",
fileName: "tiny",
formats: [ "iife" ],
},
rollupOptions: {
// make sure to externalize deps that shouldn't be bundled into the library
// external: [ "mpg123-decoder" ],
},
},
resolve: {
modules: [ path.resolve( __dirname, "src/tiny-player/tiny_node_modules" ), "node_modules" ],
alias: {
"@": path.resolve( __dirname, "src" ),
// use a custom, light-weight "fake Vue" (some utilities rely on Vue.set)
"vue": path.resolve( __dirname, "src/tiny-player/tiny_node_modules/vue" )
},
extensions: [ ".ts", ".js", "..." ],
},
});