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

Change to webpack #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Change to webpack #11

wants to merge 1 commit into from

Conversation

afilp
Copy link
Contributor

@afilp afilp commented May 21, 2015

Feel free to make any improvements.

Note that this existing code will not work on Windows: "start": "npm run build && open 'index.html'"

The open command is not recognized on Windows shell.

I only kept it because this is how you had it on master before I create this branch. I believe it should be changed if you want Windows users to have a running app without problems.

@goatslacker
Copy link
Owner

So why webpack over browserify in this case? Seems to add a lot of overhead.

I chose react's jsx transformer over babel because I wanted to highlight how you could do this in a pre-babel world. Maybe it makes sense to make this all babel?

@afilp
Copy link
Contributor Author

afilp commented May 21, 2015

I really don't have a strong opinion, I just saw that you are using babel on the other example (alt-search-docs) and thought of converting this too.

It is not a big deal, indeed there is no real gain from this. The only reason you would do that would be for consistency from project to project, nothing else (on the other hand you give an example with react's jsx transformer here).

When you say a lot of overhead you mean at the compiled (final) application or just during the development? You mean that babel makes the compiled application heavier? (unnoticeable obviously for this small project, still one must think of all consequences)

@goatslacker
Copy link
Owner

I don't have any issues with babel, I think it's great. I intended this to serve as an example for people who want to use the react transformer for their code rather than using babel. This shows off how you can still use all the react transformer stuff with Alt. I'm not sure if this is even a valid use case any more as many more people are migrating over to babel.

As far as webpack vs browserify. You're removing 1 line of npm config code and replacing it with 26 lines of webpack config code to do the same exact thing :) That's what I mean by overhead.

I am open to this though, if we do end up going this route lets drop the jsx from the files since they're not necessary with babel.

@svnm
Copy link
Contributor

svnm commented May 22, 2015

firstly sorry for adding that open index.html I forget people are on windows too.

secondly I am for the idea of moving this over to use babel, as it would keep consistency with the iso examples and as you mention we could drop the jsx from the files. I was a bit confused on this, moving between the 2 examples.

As for browserify vs webpack, I prefer the ease of use with browserify for this example. I would say possibly having an alternative npm build-webpack command or something could be an idea but not sure if this is standard behaviour.

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

Successfully merging this pull request may close these issues.

4 participants