LoginSignup
10
2

More than 3 years have passed since last update.

Laravel Mixでサブディレクトリを使用した際にURLを書き換える

Last updated at Posted at 2019-06-23

症状

MAMPを使ってサブディレクトリでLaravelプロジェクトを動かしていた際に、URLにそこが反映されず404が出てしまっていた

原因

初期のnpm run dev/productionで書き換えられるURLにはサブドメインが考慮されていなかった

対処方法

webpack.config.jsにmix.setResourceRoot('/subdomain/');を追加

参考

10
2
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
10
2