-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [#1] Require nystudio107/craft-vite:^5.0.0 package. * [#1] Initial Vite & Craft Plugin config * [#1] .gitignore Updates
- Loading branch information
1 parent
cff431c
commit bfd0c2c
Showing
18 changed files
with
1,084 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,6 @@ | |
/.idea | ||
/vendor | ||
.DS_Store | ||
node_modules | ||
/web/dist | ||
/.vite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
use craft\helpers\App; | ||
|
||
|
||
// Decides which port to use for devServerPublic. This allows | ||
// you to visit the http or https port. If you plant to only | ||
// use http, make sure that PRIMARY_SITE_URL is set to http | ||
// | ||
// Match ports to .ddev/config.yaml -> web_extra_exposed_ports | ||
$host = Craft::$app->getRequest()->getIsConsoleRequest() | ||
? App::env('PRIMARY_SITE_URL') | ||
: Craft::$app->getRequest()->getHostInfo(); | ||
$httpPort = 3000; | ||
$httpsPort = 3001; | ||
$devServerPort = str_starts_with($host, 'https') ? $httpsPort : $httpPort; | ||
|
||
return [ | ||
'devServerPublic' => "$host:$devServerPort", | ||
'serverPublic' => '/dist/', | ||
'useDevServer' => App::env('CRAFT_ENVIRONMENT') === 'dev', | ||
'manifestPath' => '@webroot/dist/.vite/manifest.json', | ||
]; |
Oops, something went wrong.