文章目录
- 
- [关键配置 - liveReload](#关键配置 - liveReload)
 
关键配置 - liveReload
            
            
              typescript
              
              
            
          
          const dev_config = {
    devtool: 'source-map',
    // watch: true,
    devServer: {
        contentBase: path.resolve(__dirname, 'bin'),
        port: 8005,
        host:'192.168.xx.xx',
        inline: true,
        hot: false,
        liveReload: false //关键这一行【false不会自动刷新浏览器,默认true会】
    },
    // 启用观察
    watchOptions: {
        // 限制并行处理模块的数量
        aggregateTimeout: 1000, // in ms
        poll: 500, // 间隔单位 ms
        ignored: /node_modules/, //忽略监听
    },
    entry: './src/Main.ts',
    output: {
        path: path.resolve(__dirname, './bin/js'),
        publicPath: '/js/',
        filename: 'bundle.js'
    },
};