Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Use uglify instead of minifify and fix up sourcemap generation #192

Merged
merged 1 commit into from
Sep 23, 2016

Conversation

jeffposnick
Copy link
Contributor

R: @addyosmani @gauntface

Going with uglify as recommended in the gulp docs seems to lead to a better-behaving sourcemap when used from Chrome's debugger.

It also leads to a slightly smaller final bundle (15kb vs 17kb with minifify).

This also fixes up the URL pointing to the sourcemap file, telling the debugger to look for the sourcemap in the same directory as the sw-toolbox.js library, rather than in a ./build/ subdirectory.

I decided to just inline the Apache 2.0 license header that gets prepending to the generated library, but if you think it's too messy that way, I can put it in a standalone file and then call fs.readFileSync() to bring it into the build.

Fixes #169

@gauntface
Copy link

LGTM and +1 the license header approach, looks clean to me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is source map working properly?
3 participants