Expected behaviour
The @highcharts/react npm package should either:
include the src/ directory referenced by its .js.map files, or
omit source map files from the published package if sources are not shipped
Actual behaviour
Every .js.map file in the published package (e.g. Highcharts.js.map, options/YAxis.js.map, options/index.js.map) references source files under a src/ directory (e.g. src/Highcharts.tsx, src/options/YAxis.tsx) that are not present in the published package. This causes source-map-loader to emit warnings for every file during webpack builds:
WARNING in ../../node_modules/@highcharts/react/options/YAxis.js Module Warning (from source-map-loader): Failed to parse source map from '...\node_modules\@highcharts\react\src\options\YAxis.tsx' file: Error: ENOENT: no such file or directory
Live demo with steps to reproduce
- npm install @highcharts/react
- Import and use any component from @highcharts/react in a webpack-based project (e.g. Create React App / CRACO)
- Run the development build
- Observe source-map-loader warnings for every file in the package
Product version
v4.2.1
Affected browser(s)
Build-time only
Expected behaviour
The @highcharts/react npm package should either:
include the src/ directory referenced by its .js.map files, or
omit source map files from the published package if sources are not shipped
Actual behaviour
Every .js.map file in the published package (e.g. Highcharts.js.map, options/YAxis.js.map, options/index.js.map) references source files under a src/ directory (e.g. src/Highcharts.tsx, src/options/YAxis.tsx) that are not present in the published package. This causes source-map-loader to emit warnings for every file during webpack builds:
WARNING in ../../node_modules/@highcharts/react/options/YAxis.js Module Warning (from source-map-loader): Failed to parse source map from '...\node_modules\@highcharts\react\src\options\YAxis.tsx' file: Error: ENOENT: no such file or directoryLive demo with steps to reproduce
Product version
v4.2.1
Affected browser(s)
Build-time only