You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/continuous-integration.yml
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -128,7 +128,7 @@ jobs:
128
128
129
129
- name: Build assets for production
130
130
working-directory: 'packages/hydefront'
131
-
run: npm run prod
131
+
run: npm run build
132
132
133
133
- name: Upload artifacts
134
134
uses: actions/upload-artifact@v4
@@ -164,7 +164,7 @@ jobs:
164
164
run: sed -i 's/\.\/vendor\/hyde\/framework\/resources\/views\/\*\*\/\*\.blade\.php/\.\/packages\/framework\/resources\/views\/\*\*\/\*\.blade\.php/' tailwind.config.js
165
165
166
166
- name: Build assets for production
167
-
run: npm run prod
167
+
run: npm run build
168
168
169
169
- name: Copy compiled app.css file to HydeFront dist folder
Copy file name to clipboardExpand all lines: docs/creating-content/managing-assets.md
+7-8Lines changed: 7 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ With Hyde, **you don't have to do it**, in fact, you can skip this entire page i
13
13
But as always with Hyde, you can customize everything if you want to.
14
14
15
15
Hyde ships with a complete frontend using Blade views, TailwindCSS styles, and Alpine.js interactions.
16
-
Some extra custom styles are made in the HydeFront package, which is pre-installed and bundled in the pre-configured Laravel Mix.
16
+
Some extra custom styles are made in the HydeFront package, which is pre-installed and bundled in the pre-configured Tailwind and Vite setup.
17
17
18
18
To get you started quickly, all the styles are already compiled and minified into `_media/app.css`,
19
19
which will be copied to the `_site/media/app.css` directory when you run `php hyde build`.
@@ -51,22 +51,21 @@ all asset files here will get copied as they are into the `_site/media` folder.
51
51
It may seem weird to have two folders for storing the compiled assets, but it is quite useful.
52
52
53
53
The `_site` directory is intended to be excluded from version control, while the `_media` folder is included in the
54
-
version control. You are of course free to modify this behaviour by editing the `webpack.mix.js` file to change the output directory.
54
+
version control. You are of course free to modify this behaviour by editing the `vite.config.js` file to change the output directory.
55
55
56
56
## How Do I Compile Assets?
57
57
58
58
First, make sure that you have installed all the NodeJS dependencies using `npm install`.
59
-
Then run `npm run dev` to compile the assets. If you want to compile the assets for production, run `npm run prod`.
60
-
You can also run `npm run watch` to watch for changes in the source files and recompile the assets automatically.
59
+
Then run `npm run dev` to compile the assets in development mode. For production builds, run `npm run build`.
61
60
62
61
### How does it work?
63
62
64
-
Hyde uses [Laravel Mix](https://laravel-mix.com/)(which is a wrapper for [Webpack](https://webpack.js.org/)) to compile the assets.
63
+
Hyde uses [Vite](https://vite.dev/) to compile assets.
65
64
66
65
When running the `npm run dev/prod` command, the following happens:
67
66
68
-
1.Laravel Mix will compile the `resources/assets/app.css` file into `_media/app.css` using PostCSS with TailwindCSS and AutoPrefixer.
69
-
2.Mix then copies the `_media` folder into `_site/media`, this is so that they are automatically accessible to your site without having to rerun `php hyde build`.
67
+
1.Vite will compile the `resources/assets/app.css` file into `_media/app.css` using PostCSS with TailwindCSS and AutoPrefixer.
68
+
2.Vite then copies the `_media` folder into `_site/media`, this is so that they are automatically accessible to your site without having to rerun `php hyde build`.
70
69
71
70
## Telling Hyde where to find assets
72
71
@@ -102,7 +101,7 @@ set `use_play_cdn` to `true` in the `config/hyde.php` file. This will in additio
102
101
also add a script tag which loads the TailwindCSS Play CDN.
103
102
104
103
What's even better is that Hyde will also inject the contents of the included `tailwind.config.js` file into the script tag,
105
-
so the Play CDN styles match the ones created by Laravel Mix.
104
+
so the Play CDN styles match the ones created by Vite.
106
105
107
106
All in all, this allows you to tinker around with Tailwind without having to compile anything.
Copy file name to clipboardExpand all lines: docs/digging-deeper/troubleshooting.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,7 +73,7 @@ You can read more about some of these in the [Core Concepts](core-concepts#paths
73
73
| Page not discovered when compiling | The file name may be invalid | Ensure you follow the correct file naming convention. |
74
74
| Page compiles slowly | The Torchlight extension may cause the compile times to increase as API calls need to be made. | Try disabling Torchlight |
75
75
| Torchlight not working | Missing Composer package, missing API token, extension disabled in the config. | Reinstall Torchlight, add your token in the `.env` file, check config |
76
-
| Missing styles and/or assets | You may have accidentally deleted the files, or you have added new Tailwind classes. | Run `npm run dev`|
76
+
| Missing styles and/or assets | You may have accidentally deleted the files, or you have added new Tailwind classes. | Run `npm run build`|
77
77
| Image not found | You may be using a bad relative path. | Ensure your relative paths are correct. See [managing-assets](managing-assets#referencing-images). |
78
78
| Wrong layout used | Hyde determines the layout template to use depending on the directory of the source file | Ensure your source file is in the right directory. |
79
79
| Invalid/no permalinks or post URIs | You may be missing or have an invalid site URL | Set the site URL in the `.env` file |
Copy file name to clipboardExpand all lines: docs/getting-started/quickstart.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,7 @@ on what kind of page it is. You don't have to worry about routing as Hyde takes
68
68
69
69
### Managing assets
70
70
71
-
Hyde comes bundled with a precompiled and minified `app.css` file, containing all the Tailwind you need for the default views meaning that you don't even need to use NPM. However, Hyde is already configured to use Laravel Mix to compile your assets if you feel like there's a need to build the assets yourself. See more on the [Managing Assets](managing-assets) page.
71
+
Hyde comes bundled with a precompiled and minified `app.css` file, containing all the Tailwind you need for the default views meaning that you don't even need to use NPM. However, Hyde is already configured to use Vite to compile your assets if you feel like there's a need to build the assets yourself. See more on the [Managing Assets](managing-assets) page.
0 commit comments