Skip to content

CRA 5 source map warnings caused by container-query-toolkit& resize-observer-lite #104

@juspky

Description

@juspky

After updating to CRA 5 we get source map warnings caused by container-query-toolkit& resize-observer-lite

I'm opening this issue here because as it seems container-query-toolkit and resize-observer-lite are dependencies of react-container-query and you're the same maintainers.

WARNING in ./node_modules/container-query-toolkit/lib/matchQueries.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/frontend/node_modules/container-query-toolkit/src/matchQueries.ts' file: Error: ENOENT: no such file or directory, open '/frontend/node_modules/container-query-toolkit/src/matchQueries.ts'
 @ ./node_modules/react-container-query/lib/index.js 41:21-72
 @ ./src/domain-components/CaseSidebarShared/SharedSidebar.tsx 8:0-58 50:47-64 51:49-66 146:10-27 146:29-46
 @ ./src/domain-components/CaseTemplate/CaseTemplateSidebar/CaseTemplateSidebar.tsx 8:0-79 57:30-43
 @ ./src/pages/CaseTemplate/CaseTemplatePage.tsx 12:0-106 72:43-62
 @ ./src/App.tsx 16:0-68 208:36-52
 @ ./src/index.tsx 14:0-24 34:44-47
WARNING in ./node_modules/resize-observer-lite/lib/index.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/frontend/node_modules/resize-observer-lite/src/index.ts' file: Error: ENOENT: no such file or directory, open '/frontend/node_modules/resize-observer-lite/src/index.ts'
 @ ./node_modules/react-container-query/lib/ContainerQueryCore.js 7:29-60
 @ ./node_modules/react-container-query/lib/index.js 43:27-58
 @ ./src/domain-components/CaseSidebarShared/SharedSidebar.tsx 8:0-58 50:47-64 51:49-66 146:10-27 146:29-46
 @ ./src/domain-components/CaseTemplate/CaseTemplateSidebar/CaseTemplateSidebar.tsx 8:0-79 57:30-43
 @ ./src/pages/CaseTemplate/CaseTemplatePage.tsx 12:0-106 72:43-62
 @ ./src/App.tsx 16:0-68 208:36-52
 @ ./src/index.tsx 14:0-24 34:44-47

Other npm packages work fine after upgrading to CRA 5.
Since this exclusively happens to packages by the react-container-query group. I suspect that there might be something wrong in the bundling process, that got copied between container-query-toolkit and resize-observer-lite.

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