mariusbalcytis / webpack-bundle

Bundle to Integrate Webpack into Symfony
MIT License
122 stars 36 forks source link

HMR not starting with HTTPS #64

Closed m-albo closed 7 years ago

m-albo commented 7 years ago

Hi,

SSL is needed for my project so i would like enable https with Webpack. But when i do that, HMR doesn't start (empty console).

My configuration

maba_webpack:
    config:
        parameters:
            dev_server_public_path: https://my_project/compiled/
    bin:
        dev_server:
            arguments:
                - --hot
                - --inline
                - --https
                - --host
                - 0.0.0.0

Any idea?

m-albo commented 7 years ago

For those interested, I finally fix my problem by using this configuration :

devServer: {
        https: true,
        headers: { 'Access-Control-Allow-Origin': '*' },
        overlay: {
            warnings: false,
            errors: true
        }
    }

and by replacing

publicPath = DEV_SERVER ? 'http://localhost:8080/compiled/' : '/compiled/';

with

publicPath = DEV_SERVER ? '//localhost:8080/compiled/' : '/compiled/';
mariusbalcytis commented 7 years ago

CORS headers were fixed with #62.

Additionally:

Thanks!