nx fix vite build (#872)

This commit is contained in:
Brandon Thomas authored and GitHub committed 2025-10-09 23:53:34 -04:00
1 parent 5c3760f9ec
commit 8f2a03e21e
9 files changed
+53 -21

No files matched your search

+2 -1
View File
@@ -17,7 +17,7 @@
"build": "vite build",
"preview": "vite preview --port 8080",
"dev": "echo 'editor3d' && vite dev",
"production-preview": "echo 'editor3d dev with production preview' && vite build && vite preview --port 5173",
"production-preview": "echo 'editor3d dev with production preview' && vite build --debug --emptyOutDir --logLevel info && vite preview --port 5173",
"staging-build": "vite build",
"lint": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint playground/* .",
"typecheck": "tsc",
@@ -65,6 +65,7 @@
"react-dom": "^18.2.0",
"react-drag-drop-files": "^2.3.10",
"react-helmet": "^6.1.0",
"react-hot-toast": "^2.5.2",
"react-image-crop": "^11.0.5",
"react-konva": "^18.2.10",
"react-router": "^6.26.1",
@@ -7,7 +7,13 @@ import * as path from 'path';
export default defineConfig(() => ({
root: __dirname,
cacheDir: '../../../node_modules/.vite/libs/components/login-modal',
plugins: [react(), dts({ entryRoot: 'src', tsconfigPath: path.join(__dirname, 'tsconfig.lib.json') })],
plugins: [
react(),
dts({
entryRoot: 'src',
tsconfigPath: path.join(__dirname, 'tsconfig.lib.json')
})
],
// Uncomment this if you are using workers.
// worker: {
// plugins: [ nxViteTsPaths() ],
@@ -5,7 +5,6 @@ import {
JobContextType,
MaybeCanvasRenderBitmapType,
UploaderState,
UploaderStates,
} from "@storyteller/common";
import { PopoverMenu, PopoverItem } from "@storyteller/ui-popover";
import { Tooltip } from "@storyteller/ui-tooltip";
@@ -32,7 +31,7 @@ import {
EnqueueContextualEditImage,
EnqueueContextualEditImageSize,
} from "@storyteller/tauri-api";
import { usePrompt2DStore, RefImage } from "./promptStore";
import { usePrompt2DStore } from "./promptStore";
import { gtagEvent } from "@storyteller/google-analytics";
import { getCapabilitiesForModel } from "@storyteller/model-list";
import { ImageModel } from "@storyteller/model-list";
@@ -39,11 +39,8 @@ import { Signal } from "@preact/signals-react";
import {
CommandSuccessStatus,
EnqueueContextualEditImage,
EnqueueContextualEditImageModel,
EnqueueContextualEditImageSize,
// waitForSoraLogin,
} from "@storyteller/tauri-api";
// import { showActionReminder } from "@storyteller/ui-action-reminder-modal";
import { usePrompt3DStore } from "./promptStore";
import { gtagEvent } from "@storyteller/google-analytics";
import { ImageModel } from "@storyteller/model-list";
@@ -98,7 +95,7 @@ export const PromptBox3D = ({
snapshotCurrentFrame,
}: PromptBox3DProps) => {
useSignals();
const fileInputRef = useRef<HTMLInputElement>(null);
//const fileInputRef = useRef<HTMLInputElement>(null);
const textareaRef = useRef<HTMLTextAreaElement>(null);
const [content, setContent] = useState<React.ReactNode>(null);
const [isModalOpen, setIsModalOpen] = useState(false);
@@ -235,8 +235,8 @@ export const PromptBoxImage = ({
return;
}
console.log("Selected model:", selectedModel)
console.log("Prompt:", prompt)
console.debug("Selected model:", selectedModel)
console.debug("Prompt:", prompt)
setIsEnqueueing(true);
@@ -274,7 +274,7 @@ export const PromptBoxImage = ({
}
const generateResponse = await EnqueueTextToImage(request);
console.log("PromptBoxImage - generateResponse", generateResponse);
console.debug("PromptBoxImage - generateResponse", generateResponse);
await onEnqueuePressed?.(prompt, generationCount, subscriberId);
} catch (err) {
@@ -7,7 +7,13 @@ import * as path from 'path';
export default defineConfig(() => ({
root: __dirname,
cacheDir: '../../../node_modules/.vite/libs/components/toaster',
plugins: [react(), dts({ entryRoot: 'src', tsconfigPath: path.join(__dirname, 'tsconfig.lib.json') })],
plugins: [
react(),
dts({
entryRoot: 'src',
tsconfigPath: path.join(__dirname, 'tsconfig.lib.json')
})
],
// Uncomment this if you are using workers.
// worker: {
// plugins: [ nxViteTsPaths() ],
@@ -32,7 +38,18 @@ export default defineConfig(() => ({
},
rollupOptions: {
// External packages that should not be bundled into your library.
external: ['react','react-dom','react/jsx-runtime']
external: [
'react',
'react-dom',
'react/jsx-runtime',
'react-hot-toast'
],
output: {
globals: {
'react-hot-toast': 'react-hot-toast',
},
preserveModules: false,
},
},
},
test: {
+13 -2
View File
@@ -7,7 +7,13 @@ import * as path from 'path';
export default defineConfig(() => ({
root: __dirname,
cacheDir: '../../node_modules/.vite/libs/tauri-events',
plugins: [react(), dts({ entryRoot: 'src', tsconfigPath: path.join(__dirname, 'tsconfig.lib.json') })],
plugins: [
react(),
dts({
entryRoot: 'src',
tsconfigPath: path.join(__dirname, 'tsconfig.lib.json')
})
],
// Uncomment this if you are using workers.
// worker: {
// plugins: [ nxViteTsPaths() ],
@@ -32,7 +38,12 @@ export default defineConfig(() => ({
},
rollupOptions: {
// External packages that should not be bundled into your library.
external: ['react','react-dom','react/jsx-runtime']
external: [
'react',
'react-dom',
'react/jsx-runtime',
'react-hot-toast',
]
},
},
test: {
+1
View File
@@ -206,6 +206,7 @@
"react-dom": "^18.2.0",
"react-drag-drop-files": "^2.3.10",
"react-helmet": "^6.1.0",
"react-hot-toast": "^2.5.2",
"react-image-crop": "^11.0.5",
"react-konva": "^18.2.10",
"react-router": "^6.26.1",
+6 -6
View File
@@ -39,6 +39,12 @@
{
"path": "./libs/components/tooltip"
},
{
"path": "./libs/tauri-api"
},
{
"path": "./libs/tauri-events"
},
{
"path": "./libs/tauri-utils"
},
@@ -78,9 +84,6 @@
{
"path": "./libs/common"
},
{
"path": "./libs/tauri-api"
},
{
"path": "./libs/components/login-modal"
},
@@ -150,9 +153,6 @@
{
"path": "./libs/analytics/google-analytics"
},
{
"path": "./libs/tauri-events"
},
{
"path": "./libs/components/provider-setup-modal"
},