image-webpack-loader resolve jpg file wrong in ubuntu server

In my production Ubuntu server which version is 16.04.3 LTS,after push my code to it,I run yarn prod but it show me a error notice ERROR in ./resources/assets/js/mobile/pages/Home/images/banner-oath.jpg Module build failed: Error: write EPIPE at _errnoException (util.js:992:11) at WriteWrap.afterWrite [as oncomplete] (net.js:864:14) after search by google,this link solve my problem install libpng16-dev in server sudo apt-get install libpng16-dev then, it is all fine.

八月 2, 2018

Laravel Elixir使用webpack打包只引入moment.js的中文语言包

方法是使用webpack内置的ContextReplacementPlugin插件 修改_gulpfile.js_ 先引入webpack const webpack = require('webpack') 增加自定义webpack配置 elixir(mix => { Elixir.webpack.mergeConfig({ plugins: [ new webpack.ContextReplacementPlugin(/moment[\\/]locale$/, /^\.\/(zh-cn)$/) ] }); 之后运行 gulp 会发现打包之后的js会明显变小

二月 8, 2018