Closed tripper54 closed 8 years ago
Try to add __webpack_public_path__ = '/js/'
on top of resources/assets/js/app.js
:
// app.js
__webpack_public_path__ = '/js/'
// ...
require('./bootstrap')
// ...
It shouldn't be under the module
object.
Elixir.webpack.mergeConfig({
+ output: {
+ publicPath: 'js/',
+ },
module: {
- output: {
- publicPath: 'js/',
- },
loaders: [
{
test: /\.svg$/,
loader: 'file',
},
],
}
});
thanks, my bad!
Webpack is compiling the images in my Vue components OK, and saving them to public/js .
But the image path printed doesn't include the js/ prefix, it's just the compiled filename. So the output in the browser shows a broken image.
How do I set the webpack publicPath property to fix this?
I have tried
But it seems the value for publicPath is being ignored.