Skip to content

Commit

Permalink
add emptyOutDir: true to vite.config.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
AmruthPillai committed May 3, 2024
1 parent c99ce90 commit f32a85c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
5 changes: 3 additions & 2 deletions apps/artboard/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { nxViteTsPaths } from "@nx/vite/plugins/nx-tsconfig-paths.plugin";
import react from "@vitejs/plugin-react-swc";
import { defineConfig, searchForWorkspaceRoot, splitVendorChunkPlugin } from "vite";
import { defineConfig, searchForWorkspaceRoot } from "vite";

export default defineConfig({
base: "/artboard/",
Expand All @@ -11,6 +11,7 @@ export default defineConfig({

build: {
sourcemap: true,
emptyOutDir: true,
},

server: {
Expand All @@ -19,7 +20,7 @@ export default defineConfig({
fs: { allow: [searchForWorkspaceRoot(process.cwd())] },
},

plugins: [react(), nxViteTsPaths(), splitVendorChunkPlugin()],
plugins: [react(), nxViteTsPaths()],

resolve: {
alias: {
Expand Down
4 changes: 2 additions & 2 deletions apps/client/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
import { lingui } from "@lingui/vite-plugin";
import { nxViteTsPaths } from "@nx/vite/plugins/nx-tsconfig-paths.plugin";
import react from "@vitejs/plugin-react";
import { defineConfig, searchForWorkspaceRoot, splitVendorChunkPlugin } from "vite";
import { defineConfig, searchForWorkspaceRoot } from "vite";

export default defineConfig({
cacheDir: "../../node_modules/.vite/client",

build: {
sourcemap: true,
emptyOutDir: true,
},

define: {
Expand Down Expand Up @@ -38,7 +39,6 @@ export default defineConfig({
}),
lingui(),
nxViteTsPaths(),
splitVendorChunkPlugin(),
],

test: {
Expand Down
4 changes: 2 additions & 2 deletions libs/hooks/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { nxViteTsPaths } from "@nx/vite/plugins/nx-tsconfig-paths.plugin";
import react from "@vitejs/plugin-react-swc";
import * as path from "path";
import { defineConfig, splitVendorChunkPlugin } from "vite";
import { defineConfig } from "vite";
import dts from "vite-plugin-dts";

export default defineConfig({
Expand All @@ -12,14 +12,14 @@ export default defineConfig({
plugins: [
react(),
nxViteTsPaths(),
splitVendorChunkPlugin(),
dts({
entryRoot: "src",
tsconfigPath: path.join(__dirname, "tsconfig.lib.json"),
}),
],

build: {
emptyOutDir: true,
lib: {
entry: "src/index.ts",
name: "hooks",
Expand Down
4 changes: 2 additions & 2 deletions libs/ui/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { nxViteTsPaths } from "@nx/vite/plugins/nx-tsconfig-paths.plugin";
import react from "@vitejs/plugin-react-swc";
import * as path from "path";
import { defineConfig, searchForWorkspaceRoot, splitVendorChunkPlugin } from "vite";
import { defineConfig, searchForWorkspaceRoot } from "vite";
import dts from "vite-plugin-dts";

export default defineConfig({
Expand All @@ -16,14 +16,14 @@ export default defineConfig({
plugins: [
react(),
nxViteTsPaths(),
splitVendorChunkPlugin(),
dts({
entryRoot: "src",
tsconfigPath: path.join(__dirname, "tsconfig.lib.json"),
}),
],

build: {
emptyOutDir: true,
lib: {
entry: "src/index.ts",
name: "ui",
Expand Down

0 comments on commit f32a85c

Please sign in to comment.