react-webpack-server-side-example icon indicating copy to clipboard operation
react-webpack-server-side-example copied to clipboard

How would you ignore harmony features for the server?

Open mtscout6 opened this issue 10 years ago • 3 comments

Is there a configuration option I'm missing?

Here's my output:

Child server:
    Hash: 6d88699fa57e97fc02a2
    Version: webpack 1.4.15
    Time: 21ms
       [0] ./lib/server.js -1 [built] [failed]

    ERROR in ./lib/server.js
    Module parse failed: /Users/smithm/dev/node-blog/lib/server.js Line 13: Unexpected token *
    You may need an appropriate loader to handle this file type.
    |
    | // x-response-time
    | app.use(function *(next){
    |   var start = new Date;
    |   yield next;

I plan to run my server with the --harmony flag.

mtscout6 avatar Jan 07 '15 14:01 mtscout6

This is not supported right now... but I plan to upgrade the esprima parser to harmony once it's stable enough...

sokra avatar Jan 08 '15 10:01 sokra

Roger that, I'll have to check it out when you get that up and running. Thanks!

mtscout6 avatar Jan 08 '15 14:01 mtscout6

Why couldn't you use babel-loader instead of jsx-loader? That will give you a lot more ES6 features.

Node is pretty much guaranteed to throw a message about the file being over 100KB, should we be concerned about that or can it handle it?

maletor avatar Apr 02 '15 18:04 maletor