mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-13 16:16:46 +08:00
refactor: webpack config (#11421)
This commit is contained in:
@@ -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>;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user