亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

webpack-dev-server remote server configuration - Stack Overflow
我想大聲告訴你
我想大聲告訴你 2017-05-19 10:32:15
0
2
655

Scenario before configuration:

遠(yuǎn)程服務(wù)器nginx上配置了多域名端口均為80,比如配置另一個(gè)test.com,遠(yuǎn)程機(jī)器ip:10.10.10.1
本地配置host: 10.10.10.1 test.com,瀏覽器里輸入test.com即可打開網(wǎng)站

After configuration, I hope that the website can still be opened by accessing test.com, and that the js file can be automatically refreshed after modifying it

webpack.config.js configuration is as follows:

{
    entry: {
    
        test:`/es/test.es`
    },
    output: {
        path: Path.resolve('../', 'build/js/'),
        
        filename: '[name].js'
    },
    devServer: {
        proxy: {
            "/build/js/test.js": 'http://test.com/build/js/test.js'
        },
        contentBase: '../build/js/',
        watchContentBase: true,
        public:'test.com'
}
}

There is only one sentence configured in package.json
"start": "webpack-dev-server",

But the modified file is not automatically refreshed
After the file is changed, automatic compilation can be performed, but the accessed test.com is not automatically refreshed
Please answer

我想大聲告訴你
我想大聲告訴你

reply all(2)
滿天的星座

Add a sentence --inline --hot Try it

漂亮男人
entry: ['webpack/hot/dev-server', path.resolve(__dirname, './app/main.js')],
這樣定義試試
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template