Skip to content

Commit c1e3f4d

Browse files
committed
fix(builtin): update to latest ncc
This contains a fix for how browserify is built, so that builtin modules don't get arbitrary webpack-assigned module IDs Fixes #771
1 parent b6bb475 commit c1e3f4d

34 files changed

Lines changed: 30860 additions & 52010 deletions

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"@bazel/ibazel": "0.10.1",
1616
"@commitlint/cli": "^8.0.0",
1717
"@commitlint/config-conventional": "^8.0.0",
18-
"@zeit/ncc": "0.18.1",
18+
"@zeit/ncc": "0.20.2",
1919
"bazel_workspaces": "file:./tools/npm_packages/bazel_workspaces",
2020
"browserify": "16.2.3",
2121
"clang-format": "1.2.2",

scripts/vendor_browserify.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ echo "Compiling browserify with ncc"
1111
echo "Copy LICENSE"
1212
cp -f ./node_modules/browserify/LICENSE ./third_party/github.com/browserify/browserify
1313

14-
echo "Minifying browserify with tserver"
14+
echo "Minifying browserify with terser"
1515
./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
1616

third_party/github.com/browserify/browserify/BUILD.bazel

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ package(default_visibility = ["//visibility:public"])
44

55
licenses(["notice"])
66

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

20-
_SOURCES = [
21-
"_empty.js",
22-
"_prelude.js",
23-
"advanced.txt",
24-
"empty.js",
25-
"index.min.js",
26-
"usage.txt"
27-
]
28-
29-
# Don't glob(["*"]) so that index.js is not included in the package as
30-
# it is very large and we only want to include index.min.js
3120
filegroup(
3221
name = "package_contents",
33-
srcs = _SOURCES + [
22+
srcs = glob(["**/*.js"]) + [
23+
"advanced.txt",
3424
"BUILD.bazel",
3525
"LICENSE",
26+
"usage.txt",
3627
],
3728
visibility = ["//:__pkg__"],
3829
)
39-
40-
filegroup(
41-
name = "sources",
42-
srcs = _SOURCES + [
43-
"//third_party/github.com/jhermsmeier/browserify-named-amd:sources",
44-
],
45-
)

0 commit comments

Comments
 (0)