Laravel-mix: Extract not working

Created on 13 Jan 2017  路  1Comment  路  Source: JeffreyWay/laravel-mix

I'm seeing this error:

Uncaught ReferenceError: webpackJsonp is not defined

For both, vendor.js and app.js.

I'm also curios about the limitations for mix.extract(). jQuery and Vue seem to get extracted, but laravel-echo or pusher-js for example do not when using import or require().

Most helpful comment

You need to also serve manifest.js file that webpack creates. [1]

<script src="{{ mix('js/manifest.js') }}"></script>
<script src="{{ mix('js/vendor.js') }}"></script>
<script src="{{ mix('js/app.js') }}"></script>

[1] https://github.com/JeffreyWay/laravel-mix/blob/master/docs/extract.md

>All comments

You need to also serve manifest.js file that webpack creates. [1]

<script src="{{ mix('js/manifest.js') }}"></script>
<script src="{{ mix('js/vendor.js') }}"></script>
<script src="{{ mix('js/app.js') }}"></script>

[1] https://github.com/JeffreyWay/laravel-mix/blob/master/docs/extract.md

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mstralka picture mstralka  路  3Comments

rderimay picture rderimay  路  3Comments

sdebacker picture sdebacker  路  3Comments

wendt88 picture wendt88  路  3Comments

dtheb picture dtheb  路  3Comments