8000 Several circular dependencies causing memory alloc issues on build · Issue #35 · devbookhq/splitter · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Several circular dependencies causing memory alloc issues on build #35
Open
@SerdarSanri

Description

@SerdarSanri

It cost me 4 hours to pinpoint why my builds all of a sudden started to fail with memory alloc exception, finally I found your library i introduced few months ago in our project causing the problem. It looks like there are many file imports index.tsx file but also index.tsx imports them. it is not noticeable unless you enable sourcemaps in vite builds.

here are some of the examples
index.tsx

import React, {
  useEffect,
  useReducer,
  useRef,
} from 'react';
import type { MouseEvent, TouchEvent } from 'react';

import './index.css';
import getInnerSize from './utils/getInnerSize';
import useEventListener from './useEventListener';
import Gutter from './Gutter';
import { ActionType } from './state/reducer.actions';
import reducer, { State } from './state/reducer';
import getGutterSizes from './utils/getGutterSize';
import flattenChildren from './utils/flattenChildren';
import { isTouchEvent } from 'utils/isTouchEvent';

Image

Image

Image

Image

I will work on a PR tomorrow if I have some time but meanwhile if you can fix these issues before I raise PR that would be great.

otherwise it is a great tool.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0