|
4 | 4 | // Utilities |
5 | 5 | import { defineConfig } from 'vite' |
6 | 6 | import { fileURLToPath, URL } from 'node:url' |
| 7 | +import {rootFileUrl, viteBaseConfig} from "##/vite.config.mjs"; |
7 | 8 | // import { resolve } from 'node:path' |
8 | 9 | // https://vitejs.dev/config/ |
9 | 10 | export default defineConfig({ |
10 | | - define: { 'process.env': {} }, |
11 | | - resolve: { |
12 | | - alias: { |
13 | | - // https://vitejs.dev/config/shared-options.html#resolve-alias |
14 | | - //https://nodejs.dev/en/api/v18/packages/#subpath-imports |
15 | | - '##': fileURLToPath(new URL('./',import.meta.url)),//might want to try # or @ again |
16 | | - '#src': fileURLToPath(new URL('./src', import.meta.url)), |
17 | | - '#docs': fileURLToPath(new URL('./docs', import.meta.url)),//not sure if vite also needs this but yea |
18 | | - }, |
19 | | - extensions: [ |
20 | | - '.js', |
21 | | - '.json', |
22 | | - '.mjs', |
23 | | - '.vue', |
24 | | - ], |
25 | | - }, |
26 | | - /** |
27 | | - * For experimentation of puppeteer |
28 | | - */ |
| 11 | + ...viteBaseConfig, |
29 | 12 | build: { |
30 | | - //https://vitejs.dev/guide/build.html#library-mode |
31 | | - outDir: fileURLToPath(new URL('./lib/dist/', import.meta.url)), |
| 13 | + //https://vitejs.dev/guide/build.html#library-mode |
| 14 | + outDir: fileURLToPath(new URL('./lib/bin_build/.output/', rootFileUrl)), |
32 | 15 | lib: { |
33 | 16 | name: 'nuxt3-win32-posix-path', |
34 | | - // formats: ['es', 'cjs','umd'],//('es' | 'cjs' | 'umd' | 'iife') |
35 | 17 | formats: ['es', 'cjs'],//('es' | 'cjs' | 'umd' | 'iife') |
36 | | - //i lost my jsdocs though... weird |
37 | 18 | entry: [ //"entry" can be a dictionary or array of multiple entry points |
38 | | - // fileURLToPath(new URL('./src/index.mjs', import.meta.url)), |
39 | | - fileURLToPath(new URL('./src/win32ToWin32WSL/win32ToWin32WSL2.mjs', import.meta.url)), |
40 | | - // fileURLToPath(new URL('./temp/toWsl.mjs', import.meta.url)), |
41 | | - // fileURLToPath(new URL('./src/cli/index.mjs', import.meta.url)), |
42 | | - // fileURLToPath(new URL('./dev/node-fs-utils-dev/create-dummy-files.mjs |
43 | | - // ', import.meta.url)), |
44 | | - // fileURLToPath(new URL('./src/win32ToWin32WSL2.mjs', import.meta.url)), |
45 | | - // fileURLToPath(new URL('./src/import-material-theme-pup.mjs', import.meta.url)), |
46 | | - // resolve('src/import-theme-chrome-pup.mjs'), |
47 | | - // Ok... cannot use vite to roll it up... just doesnt work |
48 | | - // resolve('##/src/generate-pupp-json/generate-pupp-json.mjs'),//fixme, this path didnt work? |
49 | | - // fileURLToPath(new URL('./src/generate-pupp-json/generate-pupp-json.mjs', import.meta.url)), |
50 | | - // resolve('##/src/index.mjs'), |
| 19 | + fileURLToPath(new URL('./lib/bin_build/index.mjs', rootFileUrl)), |
51 | 20 | ] |
52 | 21 | }, |
53 | 22 | rollupOptions: { |
|
0 commit comments