Skip to content

App "chromeapp" field to package.json - #1691

Merged
feross merged 1 commit into
masterfrom
chromeapp
Aug 8, 2019
Merged

App "chromeapp" field to package.json#1691
feross merged 1 commit into
masterfrom
chromeapp

Conversation

@feross

@feross feross commented Aug 8, 2019

Copy link
Copy Markdown
Member

For: brave/brave-browser#5587

I'm attempting to make a defacto standard for specifying Chrome App dependency substitutions using the "chromeapp" field in package.json.

The "chromeapp" field is just like the "browser" field in package.json except it's intended for Chrome Apps instead of a generic browser environment. Bundler tools like browserify or webpack can be configured to look for the "chromeapp" field instead of the "browser" field when doing a build for a Chrome App.

In this specific package, since Chrome Apps can use raw sockets we want to replace e.g. require('net') with require('chrome-net').

I'm also sending PRs to all dependent projects that need substitutions to work in Chrome Apps.

I'm attempting to make a defacto standard for specifying Chrome App dependency substitutions using the `"chromeapp"` field in `package.json`.

The `"chromeapp"` field is just like the [`"browser"` field in `package.json`](https://github.com/defunctzombie/package-browser-field-spec) except it's intended for Chrome Apps instead of a generic browser environment. Bundler tools like `browserify` or `webpack` can be configured to look for the `"chromeapp"` field instead of the `"browser"` field when doing a build for a Chrome App.

In this specific package, since Chrome Apps can use raw sockets we want to replace e.g. `require('net')` with `require('chrome-net')`.
@feross

feross commented Aug 8, 2019

Copy link
Copy Markdown
Member Author

This will be part of 0.108.0

@feross feross mentioned this pull request Aug 9, 2019
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Mar 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant