Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore browserify support (fix #128) #236

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Restore browserify support (fix #128)
Using jsonld in a browserify-based build script does not works any more.

This PR update the `browser` key in `package.json` in order force
browserify to use the `dist` version for the browser (generated by
webpack during release process).

This solution provide browserify support without the needs to maintain
complex configuration for both webpack and browserify.
It could be less optimal in term of bundle size (for browserify use a
bundled version of jsonld), but that is better than nothing and the
modern minification tools may resolve this kind of optimization.
  • Loading branch information
nopnop committed Mar 5, 2018
commit f19bc5e0924f9aa8d4057958cab3336a711288fb
1 change: 0 additions & 1 deletion browser/ignore.js

This file was deleted.

9 changes: 1 addition & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,6 @@
]
},
"browser": {
"lib/index.js": "./lib/jsonld.js",
"crypto": "./browser/ignore.js",
"http": "./browser/ignore.js",
"jsonld-request": "./browser/ignore.js",
"request": "./browser/ignore.js",
"url": "./browser/ignore.js",
"util": "./browser/ignore.js",
"xmldom": "./browser/ignore.js"
"lib/index.js": "./dist/jsonld.js"
}
}