This repository was archived by the owner on Mar 18, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ title : Advanced Usage
3
+ sort : 5
4
+ ---
Original file line number Diff line number Diff line change
1
+ ---
2
+ title : Purge CSS
3
+ sort : 1
4
+ ---
5
+
6
+ ## Production Use
7
+
8
+ Purge CSS is useful for trimming out unused styles from your stylesheets to reduce your overall build size. To ensure
9
+ the class styles from this package don't get purged from your production build, you should add the following to your
10
+ purge css content configuration:
11
+
12
+ > {note} The following code snippet is for a TailwindCSS build configuration using a ` tailwind.config.js ` file in the build.
13
+
14
+ ``` js
15
+ module .exports = {
16
+ // ...
17
+ purge: {
18
+ content: [
19
+ // Typical laravel app purge css content
20
+ ' ./app/**/*.php' ,
21
+ ' ./resources/**/*.php' ,
22
+ ' ./resources/**/*.js' ,
23
+
24
+ // Make sure you add these lines
25
+ ' ./vendor/rawilk/laravel-form-components/src/**/*.php' ,
26
+ ' ./vendor/rawilk/laravel-form-components/resources/**/*.php' ,
27
+ ],
28
+ },
29
+ };
30
+ ```
31
+
32
+ If some styles are still being purged, it may be useful to wrap the import statement of the package's stylesheet
33
+ in a ` /* purgecss start ignore */ ` :
34
+
35
+ ``` css
36
+ /* purgecss start ignore */
37
+ @import " ../../vendor/rawilk/laravel-form-components/resources/sass/form-components" ;
38
+ /* purgecss end ignore */
39
+ ```
40
+
41
+ > {tip} Please refer to [ styling] ( /docs/laravel-form-components/v3/installation#styling ) for more information.
You can’t perform that action at this time.
0 commit comments