loopback-example-offline-sync icon indicating copy to clipboard operation
loopback-example-offline-sync copied to clipboard

Include sourcemaps for the minified code

Open bajtos opened this issue 12 years ago • 4 comments

Modify the browserify build to generate source maps when the output is minified.

~~FWIW, there is minifyify module which should do exactly what we want. Except I was not able to make the example code from README work in html5/configure.js~~

bajtos avatar May 27 '14 08:05 bajtos

Quoting browserify's readme:

If you prefer the source maps be saved to a separate .js.map source map file, you may use exorcist in order to achieve that. It's as simple as:

$ browserify main.js --debug | exorcist bundle.js.map > bundle.js 

Learn about additional options here.

And the sample code:

browserify()
  .require(require.resolve('./main'), { entry: true })
  .bundle({ debug: true })
  .pipe(exorcist(mapfile))
  .pipe(fs.createWriteStream(path.join(__dirname, 'bundle.js'), 'utf8'))

bajtos avatar May 27 '14 08:05 bajtos

Yes.

ritch avatar May 27 '14 21:05 ritch

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 23 '17 14:08 stale[bot]

This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository.

stale[bot] avatar Sep 06 '17 14:09 stale[bot]