在Webpack 4中配置sockjs网址

时间:2019-02-21 18:12:34

标签: webpack sockjs

我在Webpack中遇到以下错误:

enter image description here

此网址无效

https://app.testMedia.ca:8080/sockjs-node/info?t=132412126

但是这个有

https://app.testMedia.ca/sockjs-node/info?t=132412126

我该如何配置sockjs网址,以使其代替那个网址?

我当前的webpack设置:

module.exports = {
   entry: {
     main: './src/index.js'
}, ....

webpackdev

const merge = require('webpack-merge');
const common = require('./webpack.common.js');

module.exports = merge(common, {
  devtool: 'inline-source-map',
  devServer: {
    host: "0.0.0.0",
    historyApiFallback: true,
    disableHostCheck: true,
    contentBase: './dist',
    https:true
  },
  mode: 'development'
});

0 个答案:

没有答案