- configuration.output.path: The provided value “public” is not an absolute path! with Webpack

前端 未结 5 903
礼貌的吻别
礼貌的吻别 2021-02-06 21:08

I\'m using Laravel Mix, that is based on WebPack.

I had it working, and now, it fails with:

Invalid configuration object. Webpack has been initialised us         


        
5条回答
  •  无人及你
    2021-02-06 21:37

    Use __dirname

    e.g.

    output: {
        path: __dirname + "/dist/js", // or path: path.join(__dirname, "dist/js"),
        filename: "bundle.js"
    }
    

    Getting: Error: `output.path` needs to be an absolute path or `/`

提交回复
热议问题