Skip to content

Frontend build warnings #14

@mattmunnich

Description

@mattmunnich

When updating the frontend, I getting a warning that the code would be much large than recommended and one should consider splitting the code:

 npm uninstall caniuse-lite
caniuse-lite has been successfully updated

No target browser changes
npm notice
npm notice New major version of npm available! 10.8.2 -> 11.5.2
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.5.2
npm notice To update run: npm install -g npm@11.5.2
npm notice

> frontend@0.1.0 build
> react-scripts build

Creating an optimized production build...
Compiled with warnings.

Failed to parse source map from '/var/www/mapmaker-new_js/frontend/node_modules/plotly.js/dist/maplibre-gl-unminified.js.map' file: Error: ENOENT: no such file or directory, open '/var/www/mapmaker-new_js/frontend/node_modules/plotly.js/dist/maplibre-gl-unminified.js.map'

[eslint]
src/components/GlobeDisplay.js
  Line 33:10:  'isHovered' is assigned a value but never used                                                                no-unused-vars
  Line 141:6:  React Hook useEffect has a missing dependency: 'fetchData'. Either include it or remove the dependency array  react-hooks/exhaustive-deps

src/utils.js
  Line 67:13:  'tickvals' is assigned a value but never used  no-unused-vars

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

File sizes after gzip:

  1.99 MB (+164 B)  build/static/js/main.f4ef0eb7.js
  1.77 kB           build/static/js/453.8ab44547.chunk.js
  356 B             build/static/css/main.0691431e.css

The bundle size is significantly larger than recommended.
Consider reducing it with code splitting: https://goo.gl/9VhYWB
You can also analyze the project dependencies: https://goo.gl/LeUzfb

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions