1

I am upgrading Laravel Spark from version 3 to 4.

Whenever I run npm run dev, I get the error...

Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema. - configuration.output.path: The provided value "public" is not an absolute path! -> The output directory as absolute path (required).

I have traced this back to a need to update the webpack.config.js file, but I don't understand how to update this. Is it something that I need to do in npm? Is there a link to the config file that should go with the new version of webpack?

I tried fixing the output path like below, but it didn't work. I think that much of the file needs to change, but I am not sure in what way.

        output: {
            path: path.resolve(__dirname, 'dist') + '/app',
            filename: 'bundle.js',
            publicPath: '/app/'
        }
Joshua Foxworth
  • 1,236
  • 1
  • 22
  • 50

0 Answers0