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

Defaults for finding the 'main' bundle in production. #29

Open
matthewp opened this issue Jun 19, 2017 · 0 comments
Open

Defaults for finding the 'main' bundle in production. #29

matthewp opened this issue Jun 19, 2017 · 0 comments

Comments

@matthewp
Copy link
Contributor

Currently the default when no main is provided by the steal configuration option is to use either steal.main or main from the package.json. However this can cause problems if there is not enough information in the package.json to find the main bundle.

Possible solutions:

New config option

Create a new field, maybe called bundle or something that points to the exact path of the bundle:

ssr({}, {
  bundle: __dirname + "/dist/bundles/package/index.js"
})

Some algorithm that can find the main bundle

Create a new package that scrubs the filesystem to search for the main bundle. It could do this by using the package.json as metadata, but would have to have some knowledge for how the main lookup logic works in steal.js.

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

No branches or pull requests

1 participant