Skip to content
This repository has been archived by the owner on Oct 17, 2020. It is now read-only.

liferay-npm-bundler fails if no .npmbundlerrc file is found #29

Closed
izaera opened this issue Aug 23, 2017 · 6 comments
Closed

liferay-npm-bundler fails if no .npmbundlerrc file is found #29

izaera opened this issue Aug 23, 2017 · 6 comments
Assignees

Comments

@izaera
Copy link
Member

izaera commented Aug 23, 2017

A way to fix this would be running liferay-npm-bundler-preset-standard by default if no .npmbundlerrc file is found.

@jbalsas
Copy link
Contributor

jbalsas commented Aug 23, 2017

Do you mean running liferay-npm-bundler-preset-standard?

@izaera
Copy link
Member Author

izaera commented Aug 23, 2017

Yes. I copy pasted the wrong name. I have edited my first comment.

@izaera
Copy link
Member Author

izaera commented Aug 31, 2017

Oops, I have fixed this with #39, but it assumes an empty .npmbundlerrc instead of sensible defaults, like liferay-npm-bundler-preset-standard.

Shall we change the behavior of #39 in favor of using liferay-npm-bundler-preset-standard or leave it like that?

What do you think @jbalsas?

@jbalsas
Copy link
Contributor

jbalsas commented Sep 14, 2017

Let's leave it like is for now and see what people expect from using it without a config.

@jbalsas jbalsas closed this as completed Sep 14, 2017
@izaera
Copy link
Member Author

izaera commented Sep 14, 2017

After looking at it in more detail, we will finally set liferay-npm-bundler-preset-standard as the default preset because it follows the more usual build lifecycle.

@izaera izaera reopened this Sep 14, 2017
@izaera izaera self-assigned this Sep 21, 2017
@izaera izaera added this to the next version milestone Sep 21, 2017
@izaera
Copy link
Member Author

izaera commented Sep 21, 2017

Oops! This is far more difficult than I thought. Babel doesn't do it either.

The technical problem is that if the bundler assumes a default preset, it has to include the preset internally because the project (to which the bundler is being applied) won't have it. That could be done, but it wouldn't leave control to the user about the version of the preset to use.

Then, we could let users override the preset version by adding a .npmbundlerrc file, but it would make the plugins resolution more complex and could lead to inconsistencies, so I find it safer not to assume a default preset.

@izaera izaera closed this as completed Sep 21, 2017
@izaera izaera removed this from the next version milestone Sep 21, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants