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

Does webpack support require.extensions['.js'] ? #54

Closed
lildemon opened this issue Jan 16, 2015 · 4 comments
Closed

Does webpack support require.extensions['.js'] ? #54

lildemon opened this issue Jan 16, 2015 · 4 comments

Comments

@lildemon
Copy link

I see the gulpfile.js and webpack's config file, it doesn't seem that webpack will property handle jsx code because those file's extension is '.js' not '.jsx'
I try to run or debug to know how it works, but don't saw a clue

Except that gulpfile has code that change the node's require behavior to transform jsx and ES6 code first

My question is:
Will webpack use node's require() to transform jsx/ES6 code?
It seems that webpack don't have this kinds of behavior
Or did I missed something?

Thanks 👍

@koistya
Copy link
Member

koistya commented Jan 16, 2015

@koistya
Copy link
Member

koistya commented Jan 16, 2015

@lildemon also, I'm going to remove jsx transform from gulpfile.js in the upcoming commit, it was used for gulp-render to work.

@lildemon
Copy link
Author

thanks :P I missed the "?" part of the regex

@koistya
Copy link
Member

koistya commented Feb 8, 2015

I have made some modifications. Webpack now generates both client-side (app.js) and server-side (server.js) bundles, which is used for server-side rendering. There is now no need to use require.extensions hacks.

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

No branches or pull requests

2 participants