Vue-Cli Webpack配置sockjs-node 404错误

时间:2019-04-17 13:32:46

标签: vue.js webpack

我尝试捆绑Vue-Cli Webpack。我使用vue.config.js进行配置。

const BundleTracker = require("webpack-bundle-tracker");

module.exports = {
    publicPath: "http://0.0.0.0:8080/",
    outputDir: './dist/',
    chainWebpack: config => {

        config.optimization
            .splitChunks(false)

        config
            .plugin('BundleTracker')
            .use(BundleTracker, [{filename: '../client-cani/webpack-stats.json'}])

        config.resolve.alias
            .set('__STATIC__', 'static')

        config.devServer
            .public('http://0.0.0.0:8080')
            .host('0.0.0.0')
            .port(8080)
            .hotOnly(true)
            .watchOptions({poll: 1000})
            .https(false)
            .headers({"Access-Control-Allow-Origin": ["\*"]})



        }
};

当我尝试输入我在socket-nodejs上得到404的地址时收到此错误 http://localhost:8000/sockjs-node/info?t=1555507390238

我该如何正确解决呢?

0 个答案:

没有答案