Skip to content

Commit

Permalink
Revert "chore: change vite.config"
Browse files Browse the repository at this point in the history
This reverts commit 359bec6.
  • Loading branch information
gioboa committed Oct 18, 2023
1 parent 1bcecb2 commit d41a21e
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions packages/qwik-storefront-ui/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
/// <reference types="vitest" />

import { qwikVite } from '@builder.io/qwik/optimizer';
import { join } from 'path';
import { dirname, join } from 'path';
import { qwikNxVite } from 'qwik-nx/plugins';
import { fileURLToPath } from 'url';
import { defineConfig } from 'vite';
import dts from 'vite-plugin-dts';
import tsconfigPaths from 'vite-tsconfig-paths';

export default defineConfig({
plugins: [
qwikVite({
vendorRoots: [join(__dirname, '../qwik-storefront-ui/src')],
}),
tsconfigPaths(),
qwikNxVite(),
qwikVite(),
tsconfigPaths({ root: '../../' }),
dts({
tsonfigPath: join(__dirname, 'tsconfig.lib.json'),
tsConfigFilePath: join(
dirname(fileURLToPath(import.meta.url)),
'tsconfig.lib.json'
),
// Faster builds by skipping tests. Set this to false to enable type checking.
skipDiagnostics: true,
}),
],
server: {
Expand All @@ -22,15 +28,19 @@ export default defineConfig({
allow: ['../../'],
},
},
mode: 'lib',

// Configuration for building your library.
// See: https://vitejs.dev/guide/build.html#library-mode
build: {
target: 'es2020',
emptyOutDir: true,
lib: {
entry: './src/index.ts',

// Could also be a dictionary or array of multiple entry points.
entry: 'src/index.ts',
name: 'qwik-storefront-ui',
fileName: (format) => `index.qwik.${format === 'es' ? 'mjs' : 'cjs'}`,
// fileName: 'index',
// Change this to the formats you want to support.
// Don't forgot to update your package.json as well.
formats: ['es', 'cjs'],
Expand Down

0 comments on commit d41a21e

Please sign in to comment.