Skip to content

Commit d41a21e

Browse files
committed
Revert "chore: change vite.config"
This reverts commit 359bec6.
1 parent 1bcecb2 commit d41a21e

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

packages/qwik-storefront-ui/vite.config.ts

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
11
/// <reference types="vitest" />
22

33
import { qwikVite } from '@builder.io/qwik/optimizer';
4-
import { join } from 'path';
4+
import { dirname, join } from 'path';
5+
import { qwikNxVite } from 'qwik-nx/plugins';
6+
import { fileURLToPath } from 'url';
57
import { defineConfig } from 'vite';
68
import dts from 'vite-plugin-dts';
79
import tsconfigPaths from 'vite-tsconfig-paths';
810

911
export default defineConfig({
1012
plugins: [
11-
qwikVite({
12-
vendorRoots: [join(__dirname, '../qwik-storefront-ui/src')],
13-
}),
14-
tsconfigPaths(),
13+
qwikNxVite(),
14+
qwikVite(),
15+
tsconfigPaths({ root: '../../' }),
1516
dts({
16-
tsonfigPath: join(__dirname, 'tsconfig.lib.json'),
17+
tsConfigFilePath: join(
18+
dirname(fileURLToPath(import.meta.url)),
19+
'tsconfig.lib.json'
20+
),
21+
// Faster builds by skipping tests. Set this to false to enable type checking.
22+
skipDiagnostics: true,
1723
}),
1824
],
1925
server: {
@@ -22,15 +28,19 @@ export default defineConfig({
2228
allow: ['../../'],
2329
},
2430
},
25-
mode: 'lib',
31+
2632
// Configuration for building your library.
2733
// See: https://vitejs.dev/guide/build.html#library-mode
2834
build: {
35+
target: 'es2020',
36+
emptyOutDir: true,
2937
lib: {
38+
entry: './src/index.ts',
39+
3040
// Could also be a dictionary or array of multiple entry points.
31-
entry: 'src/index.ts',
3241
name: 'qwik-storefront-ui',
3342
fileName: (format) => `index.qwik.${format === 'es' ? 'mjs' : 'cjs'}`,
43+
// fileName: 'index',
3444
// Change this to the formats you want to support.
3545
// Don't forgot to update your package.json as well.
3646
formats: ['es', 'cjs'],

0 commit comments

Comments
 (0)