mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-17 07:04:36 +00:00
cleanup
This commit is contained in:
1 parent
ad0f67c667
commit
36fe9cb600
2 files changed
-36
No files matched your search
@@ -88,15 +88,11 @@ export const PageEnigma = ({ sceneToken }: { sceneToken?: string }) => {
|
||||
});
|
||||
});
|
||||
|
||||
console.log(">>> test - install events in PageEnigma");
|
||||
|
||||
useGenerationEnqueueSuccessEvent();
|
||||
useGenerationEnqueueFailureEvent();
|
||||
useGenerationCompleteEvent();
|
||||
useGenerationFailedEvent();
|
||||
|
||||
console.log(">>> test - install events in PageEnigma block over");
|
||||
|
||||
useFlashUserInputErrorEvent(async (event) => {
|
||||
console.log("Flash user input error event received:", event);
|
||||
toast.error(event.message);
|
||||
@@ -151,9 +147,3 @@ export const PageEnigma = ({ sceneToken }: { sceneToken?: string }) => {
|
||||
</EngineProvider>
|
||||
);
|
||||
};
|
||||
|
||||
(window as any).test_toast = () => {
|
||||
toast.error('foo');
|
||||
}
|
||||
|
||||
(window as any).toast_2 = toast;
|
||||
@@ -4,29 +4,6 @@ import react from '@vitejs/plugin-react';
|
||||
import dts from 'vite-plugin-dts';
|
||||
import * as path from 'path';
|
||||
|
||||
/*
|
||||
import pkg from './package.json' assert { type: 'json' };
|
||||
|
||||
// Treat *all* peer deps as externals (React, Zustand, etc.)
|
||||
const externals = [
|
||||
...Object.keys(pkg.peerDependencies ?? {}),
|
||||
// (optional) anything else you want external
|
||||
// 'react/jsx-runtime'
|
||||
];
|
||||
|
||||
export default defineConfig({
|
||||
build: {
|
||||
lib: {
|
||||
entry: 'src/index.ts',
|
||||
formats: ['es', 'cjs'],
|
||||
fileName: (format) => (format === 'es' ? 'index.js' : 'index.cjs'),
|
||||
},
|
||||
rollupOptions: {
|
||||
external: (id) =>
|
||||
externals.some((dep) => id === dep || id.startsWith(`${dep}/`)),
|
||||
*/
|
||||
|
||||
|
||||
export default defineConfig(() => ({
|
||||
root: __dirname,
|
||||
cacheDir: '../../../node_modules/.vite/libs/components/toaster',
|
||||
@@ -68,10 +45,7 @@ export default defineConfig(() => ({
|
||||
'react-hot-toast'
|
||||
],
|
||||
output: {
|
||||
// only needed for UMD/IIFE; safe to omit for ESM/CJS
|
||||
globals: {
|
||||
//react: 'React',
|
||||
//'react-dom': 'ReactDOM',
|
||||
'react-hot-toast': 'react-hot-toast',
|
||||
},
|
||||
preserveModules: false,
|
||||
|
||||
Reference in new issue
Block a user