mozilla / source-map

Consume and generate source maps.
Other
3.54k stars 357 forks source link

Cant bundle source-map #502

Closed sk337 closed 6 months ago

sk337 commented 6 months ago

Issue: Unable to bundle source-map into a browser environment due to path and fs resolution errors in read-wasm.js file.

Description: While attempting to bundle source-map for browser use, the bundler attempts to resolve path and fs in the read-wasm.js file, even though this file is not executed in the browser environment. This causes the bundling process to fail.

Expected Behavior: The bundler should not attempt to resolve paths or fs in the read-wasm.js file when bundling for the browser environment, as this file is only intended for use in Node.js environments.

Steps to Reproduce:

Install source-map and esbuild package. Attempt to bundle source-map for browser use. Notice the bundler trying to resolve path and fs in the read-wasm.js file.

Additional Information:

source-map version: 0.7.4 Bundler used: esbuild

sk337 commented 6 months ago

npm outdated just need to install from git