LoginSignup
0
0

More than 3 years have passed since last update.

Docker,Laravel,node環境下でnpm run buildがやたら遅くなったら

Posted at

Laravel: 6.18.3
laravel-mix: 4.1.4
node 12.17.0
npm 6.14.4

LaravelMixを4.0から4.1にバージョンアップしたことが原因らしいです。

以下、対策。

  • 共有フォルダを使用できなくする。
  • LaravelMixを4.0にダウングレード。
  • ホストマシンからビルド →ビルドする際は一度node_modulesを削除し、ローカルからnpm installしなおす必要があるかも?
  • scssファイルでurl()を使っている箇所を相対パスではなく絶対パスで記載する。

  • webpack.mix.jsに.options({ processCssUrls: false });を追記。

webpack.js
const mix = require('laravel-mix');
require('laravel-mix-polyfill');

mix.~~~
   // 下記を追加する。
   .options({ processCssUrls: false });
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0