Using master, this:
mix.js('resources/assets/js/web.js', 'public/js')
.js('resources/assets/js/app.js', 'public/js');
Results in:
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration.entry['app'] should be one of these:
string | [string]
The entry point for one output file.
- configuration.entry should be one of these:
object { <key>: string | [string] } | string | [string]
The entry point(s) of the compilation.
Is there something I'm doing wrong? Totally new to Webpack.
mix.js('resources/assets/js/web.js', 'public/js/web.js')
.js('resources/assets/js/app.js', 'public/js/app.js');
OR
mix.js([
'resources/assets/js/web.js',
'resources/assets/js/app.js'
], 'dist/bundle.js');
sauce: https://github.com/JeffreyWay/laravel-mix/issues/2#issuecomment-269259741
Actually all 3 fail for me.
mix.js('resources/assets/js/web.js', 'public/js')
.js('resources/assets/js/app.js', 'public/js');
mix.js('resources/assets/js/web.js', 'public/js/web.js');
.js('resources/assets/js/app.js', 'public/js/app.js');
mix.js('resources/assets/js/web.js', 'public/js/web.js');
@tillkruss - Have you updated your webpack.config.js file to the latest version? I'd bet that's the issue.
@JeffreyWay yes, that did the trick. Thanks a lot!
I'm getting following with fresh install.
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!
__Steps to reproduce__
laravel new exampleyarnnpm run watchLaravel Installer 1.3.3 & npm 4.4.1
__Update__
Mix incompatible with Webpack 2.3.0 - issue #595
Solution is to update devDependencies in package.json file to require WebPack 2.2.1 version
"webpack": "2.2.1",
@alenabdula This was fixed last night. Update Mix.
@JeffreyWay thanks. Great work as always!
@JeffreyWay Thanks for the fix.
Just in case someone else is having trouble with this, the error message also comes in this flavour and is fixed by this update of laravel-mix.
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration.output.filename: A relative path is expected. However the provided value "/js/[name].js" is an absolute path!
- configuration.output.path: The provided value "public" is not an absolute path!
run:npm uninstall laravel-mix && npm install --save laravel-mix
I had an issue where it wouldn't just update.
@jasonspick Try installing with --save-dev flags as Laravel Mix is installed under devDependencies in your package.json
Most helpful comment
run:
npm uninstall laravel-mix && npm install --save laravel-mixI had an issue where it wouldn't just update.