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

IPv6 #50

Open
infintesimal opened this issue Jul 29, 2017 · 0 comments
Open

IPv6 #50

infintesimal opened this issue Jul 29, 2017 · 0 comments

Comments

@infintesimal
Copy link

infintesimal commented Jul 29, 2017

Hi,
I am running webpack on a very new chromebook that prefers IPv6 strongly to IPv4. When I start my webpack/browser-sync with the following config

var customer = process.env.customer;
var commonConfig = require('./webpack.common.js');
var customerUrl = require('./customerUrls.json');
var webpackMerge = require('webpack-merge');
var BrowserSyncPlugin = require('browser-sync-webpack-plugin');

module.exports = webpackMerge(commonConfig, {
    plugins: [
        new BrowserSyncPlugin({
                host: "[::1]",
                port: 3000,
                proxy: customerUrl[customer],
                serveStatic: ["./build/" + customer, "./src/"],
                snippetOptions: {
                    rule: {
                        async: false,
                        match: /<\/head>/i,
                        fn: function(snippet, match) {
                            var file = "<script async type='text/javascript' src='/bundle.js' />";
                            return  file + snippet + match
                        }
                    }
                }
            },
            {
                reload: true
            })
    ]
});

I get the mostly correct output on my dev console, it looks like

[Browsersync] Access URLs:
 ----------------------------------
       Local: http://localhost:3000
    External: http://[::1]:3000
 ----------------------------------
          UI: http://localhost:3001
 UI External: http://::1:3001
 ----------------------------------

I am new to webpack and browser-sync world, I haven't found the toggle that would try to autopop the site I am proxying at

http://[::1]:3000

rather than

http://localhost:3000

I've mucked with etc hosts to no avail yet, I am sure I am overlooking some really simple. Help is appreciated!

For what it is worth: ipv6 may be a culprit too in issue #27 for the person who spoke of works on older host but not newer one.

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

1 participant