refactor: webpack config (#11421)

This commit is contained in:
forehalo
2025-04-03 11:55:56 +00:00
parent 565d7b2b1e
commit c8d22d97d5
51 changed files with 766 additions and 547 deletions
+1 -2
View File
@@ -23,8 +23,7 @@ export const schemeToChannel = {
export const channelToScheme = {
stable: 'affine',
canary:
process.env.NODE_ENV === 'development' ? 'affine-dev' : 'affine-canary',
canary: BUILD_CONFIG.debug ? 'affine-dev' : 'affine-canary',
beta: 'affine-beta',
internal: 'affine-internal',
} as Record<Channel, Scheme>;
+1 -1
View File
@@ -36,7 +36,7 @@ export const createIsland = () => {
Provider: ({ children }: React.PropsWithChildren) => {
const target = useLiveData(targetLiveData$);
useEffect(() => {
if (provided === true && process.env.NODE_ENV !== 'production') {
if (provided === true && BUILD_CONFIG.debug) {
throw new Error('Island should not be provided more than once');
}
provided = true;