grommet / grommet-toolbox

[DEPRECATED] Developer Environment for Grommet applications
Apache License 2.0
13 stars 24 forks source link

Not able set many of the webpack config. #37

Closed harshithjv closed 7 years ago

harshithjv commented 8 years ago

I am trying to add headers to web page requests while developing. On file grommet-toolbox.config.js I tried add:

...
  webpack: {
    devServer: {
      headers: {
        "Authorization": "Bearer jfdsdfj2423408892"
      }
    }
  }
...

I also tried to add devServer key directly, instead of embedding inside of webpack key, as mentioned in README instructions. But no luck.

This is very much needed for our use-case. Now I have to resort to running third party server like Django or Flask just to redirect Grommet webapp URL with required headers.

alansouzati commented 8 years ago

The way you had in the first pass it is the right one. Having devServer key inside the main grommet toolbox config.

I'm not sure why this is not working for you, I've just tested it and it works for me.

Can you provide extra information here? Like the version of toolbox you have, version of node, things like that.

Also can you debug inside node_modules/grommet-toolbox/lib/gulp-tasks-dev.js ?

https://github.com/grommet/grommet-toolbox/blob/master/src/gulp-tasks-dev.js#L65

If you here I do a deep assign of devServer key to the config for the dev server. it would be a good idea to put a console.log in your node_modules and see if the header is present.

harshithjv commented 8 years ago

Hey @alansouzati ,

Thanks for clarification. I debugged again.

It does not come up in inside dev-server wrapper url, i.e., 'http://localhost:9000/webpack-dev-server/' But available on direct loading of URls, i.e., http://localhost:9000 or http://localhost:9000/home

harshithjv commented 8 years ago

But applying headers within 'webpack' key won't work.

alansouzati commented 8 years ago

Would you mind raising an issue with webpack dev server? I believe there is nothing I could do on my end.

alansouzati commented 8 years ago

Closing the issue for now. Feel free to re-open it if you still feel there is something to fixed in the grommet toolbox side of things.

harshithjv commented 8 years ago

@alansouzati I don't its webpack issue.

alansouzati commented 8 years ago

I'm reopening the issue. have you tried it outside grommet-toolbox? can you provide extra information why you think this is not a webpack issue? there is nothing toolbox is doing apart from setting the header.

alansouzati commented 7 years ago

Can you provide extra information here?

tracybarmore commented 7 years ago

Hey @harishithjv, thanks for all your collaboration with us. We will be cleaning up our backlog first week of January 2017 by closing unresponsive issues that haven't been active for at least 30 days.

If you would like this issue to remain open in our backlog, please comment to let us know. Thanks!

tracybarmore commented 7 years ago

Backlog Grooming Jan 4, 2017 - Closing issue