Skip to content

Commit

Permalink
fix(builtin): update to latest ncc
Browse files Browse the repository at this point in the history
This contains a fix for how browserify is built, so that builtin modules don't get arbitrary webpack-assigned module IDs

Fixes #771
  • Loading branch information
alexeagle committed Jul 12, 2019
1 parent b6bb475 commit c1e3f4d
Show file tree
Hide file tree
Showing 34 changed files with 30,860 additions and 52,010 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@bazel/ibazel": "0.10.1",
"@commitlint/cli": "^8.0.0",
"@commitlint/config-conventional": "^8.0.0",
"@zeit/ncc": "0.18.1",
"@zeit/ncc": "0.20.2",
"bazel_workspaces": "file:./tools/npm_packages/bazel_workspaces",
"browserify": "16.2.3",
"clang-format": "1.2.2",
Expand Down
2 changes: 1 addition & 1 deletion scripts/vendor_browserify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ echo "Compiling browserify with ncc"
echo "Copy LICENSE"
cp -f ./node_modules/browserify/LICENSE ./third_party/github.com/browserify/browserify

echo "Minifying browserify with tserver"
echo "Minifying browserify with terser"
./node_modules/.bin/terser --compress --mangle --comments '/(^!|@license|@preserve|Copyright)/' -- third_party/github.com/browserify/browserify/index.js > third_party/github.com/browserify/browserify/index.min.js

24 changes: 4 additions & 20 deletions third_party/github.com/browserify/browserify/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package(default_visibility = ["//visibility:public"])

licenses(["notice"])

# LICENCE downloaded from browserify v16.2.3 release commit
# LICENSE downloaded from browserify v16.2.3 release commit
# https://github.com/browserify/browserify/blob/cfd3af23f6383bb5899dbb5e39beb7834b042d85/LICENSE
#
# This directory contains the [browserify](https://github.com/browserify/browserify) v16.2.3 npm package
Expand All @@ -17,29 +17,13 @@ licenses(["notice"])
# `--comments '/(^!|@license|@preserve)/'`.
exports_files(["LICENSE"])

_SOURCES = [
"_empty.js",
"_prelude.js",
"advanced.txt",
"empty.js",
"index.min.js",
"usage.txt"
]

# Don't glob(["*"]) so that index.js is not included in the package as
# it is very large and we only want to include index.min.js
filegroup(
name = "package_contents",
srcs = _SOURCES + [
srcs = glob(["**/*.js"]) + [
"advanced.txt",
"BUILD.bazel",
"LICENSE",
"usage.txt",
],
visibility = ["//:__pkg__"],
)

filegroup(
name = "sources",
srcs = _SOURCES + [
"//third_party/github.com/jhermsmeier/browserify-named-amd:sources",
],
)
Loading

0 comments on commit c1e3f4d

Please sign in to comment.