Giter Club home page Giter Club logo

press-wind's Introduction

Press Wind FSE

Minimal starter theme for WordPress with Tailwind CSS and Vite JS for Full Site Editing.

Concept

This theme is build for work with gutenberg. It's thinked for use concept of pattern. A example of pattern is in patterns directory. The theme.json is used for the settings of theme. The fonts pass by the new WP font loader. Not by CSS or TailwindCSS.

plugins required

For use ViteJS

Plugin recommended

or disable lots of WP core functionality

PHP/HTML files

This theme is developed for use Full Site Editing.

Dependencies

Requirement

  • Node JS (>18)
  • Npm, yarn, pnpm or Bun !

Quick Start

In the root of press-wind theme

Install dependencies

yarn or bun install

In your wp-config.php file, add :

# for dev
define('WP_ENV', 'development');
# for production
define('WP_ENV', 'production');

With Vitejs, you have a dev server include. When you change a file, the browser reload the page

Scripts

Launch dev mode

yarn dev

Build the assets

yarn build

Enqueue Scripts and Styles

The script and the style are automatically enqueued in theme. Code present in functions.php

/**
 * init assets front
 */
if (class_exists('PressWind\PWVite')) {

    \PressWind\PWVite::init(port: 3000, path: '');
    /**
     * init assets admin
     */
    \PressWind\PWVite::init(
        port: 4444,
        path: '/admin',
        position: 'editor',
        is_ts: false
    );
}

CSS writing style

You must use @apply method for create the CSS style It's better for reusability of your code and the readability.

Example :

.site-header {
  @apply flex my-4 lg:my-10 lg:items-center lg:flex-row flex-col;
}

But you can use the method by the class attribute, if you prefer. Be careful to keep maintainable project.

Screenshot

https://github.com/WP-Performance/press-wind/blob/main/screenshot.png

press-wind's People

Contributors

ipatate avatar jeff-wolff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

press-wind's Issues

Call to undefined function PressWind\\version() in presswind-plugin-main/vendor/wp-performance/presswind-assets/src/PWVite.php:242\nStack

We are facing an issue with the plugin file. "npm run build" successfully and also not getting any error with "npm run dev" but showing me the below error in a log file.

[Fri Mar 22 06:17:31.549343 2024] [proxy_fcgi:error] [pid 787:tid 133436110992960] [client 115.246.21.250:0] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to undefined function PressWind\version() in /home/webbycrown/webapps/webbycrown-solutions/website/web/app/plugins/presswind-plugin-main/vendor/wp-performance/presswind-assets/src/PWVite.php:242\nStack trace:\n#0 /home/webbycrown/webapps/webbycrown-solutions/website/web/app/plugins/presswind-plugin-main/vendor/wp-performance/presswind-assets/src/PWVite.php(142): PressWind\PWVite->set_script_prod()\n#1 /home/webbycrown/webapps/webbycrown-solutions/website/web/app/plugins/presswind-plugin-main/vendor/wp-performance/presswind-assets/src/PWVite.php(56): PressWind\PWVite->set_script()\n#2 /home/webbycrown/webapps/webbycrown-solutions/website/web/app/plugins/presswind-plugin-main/vendor/wp-performance/presswind-assets/src/PWVite.php(75): PressWind\PWVite->__construct()\n#3 /home/webbycrown/webapps/webbycrown-solutions/website/web/app/themes/webbycrown/functions.php(207): PressWind\PWVite::init()\n#4 /home/webbycrown/webapps/webbycrown-solutions/website/web/w...', referer:

font weight 700 not ok in Chrome/Windows or Firefox/MAC for Montserrat font or other

Hello, first great job for this theme.

I have only one big issue with font weight in chrome browser.

With the theme.json conf below, font-weight 700 or 300 works on Firefox but not on Chrome.
To make it work on chrome i add a duplicate load of font file in my css (see fonts.css)

So i include fonts.css in styles.css and editor.css

It's ok like that on front with chrome, but still not work in the admin gutemberg...
Have you got an idea ? i search and test for so long :)

The WP is in multisite mode.

Thks !

theme.json :

{
    "$schema": "https://schemas.wp.org/wp/6.0/theme.json",
    "version": 2,
    "customTemplates": [],
    "settings": {
        "appearanceTools": true,
        "color": {
            "duotone": [
                {
                    "colors": [
                        "#000000",
                        "#ffffff"
                    ],
                    "slug": "foreground-and-background",
                    "name": "Foreground and background"
                },
                {
                    "colors": [
                        "#000000",
                        "#fbb911"
                    ],
                    "slug": "foreground-and-secondary",
                    "name": "Foreground and secondary"
                },
                {
                    "colors": [
                        "#5ec1cb",
                        "#ffffff"
                    ],
                    "slug": "primary-and-background",
                    "name": "Primary and background"
                },
                {
                    "colors": [
                        "#5ec1cb",
                        "#fbb911"
                    ],
                    "slug": "primary-and-secondary",
                    "name": "Primary and secondary"
                }
            ],
            "gradients": [
                {
                    "slug": "vertical-secondary-to-background",
                    "gradient": "linear-gradient(to bottom,var(--wp--preset--color--secondary) 0%,var(--wp--preset--color--background) 100%)",
                    "name": "Vertical secondary to background"
                },
                {
                    "slug": "diagonal-primary-to-foreground",
                    "gradient": "linear-gradient(to bottom right,var(--wp--preset--color--primary) 0%,var(--wp--preset--color--foreground) 100%)",
                    "name": "Diagonal primary to foreground"
                },
                {
                    "slug": "diagonal-secondary-to-background",
                    "gradient": "linear-gradient(to bottom right,var(--wp--preset--color--secondary) 50%,var(--wp--preset--color--background) 50%)",
                    "name": "Diagonal secondary to background"
                },
                {
                    "slug": "diagonal-background-to-secondary",
                    "gradient": "linear-gradient(to bottom right,var(--wp--preset--color--background) 50%,var(--wp--preset--color--secondary) 50%)",
                    "name": "Diagonal background to secondary"
                }
            ],
            "palette": [
                {
                    "slug": "foreground",
                    "color": "#000000",
                    "name": "Foreground"
                },
                {
                    "slug": "background",
                    "color": "#ffffff",
                    "name": "Background"
                },                
                {
                    "slug": "gray-text",
                    "color": "#717070",
                    "name": "Gray Text"
                },
                {
                    "slug": "gray-light",
                    "color": "#ededed",
                    "name": "Gray Light"
                },
                {
                    "slug": "primary",
                    "color": "#5ec1cb",
                    "name": "Primary"
                },
                {
                    "slug": "secondary",
                    "color": "#fbb911",
                    "name": "Secondary"
                }
            ]
        },
        "custom": {
            "spacing": {
                "small": {
                    "top": "6px",
                    "right": "20px",
                    "bottom": "6px",
                    "left": "20px"
                },
                "medium": "clamp(1.50rem, 1.56vw, 1.875rem)",
                "large": "clamp(3.25rem, 4.375vw, 5.25rem)",
                "outer": "var(--wp--custom--spacing--small, 1.25rem)"
            },
            "typography": {
                "font-size": {
                    "title": "clamp(2.75rem, 7.6vw, 4.375rem)",
                    "subtitle": "clamp(2.25rem, 5.4vw, 3.125rem)",
                    "thirdtitle": "clamp(1.2rem, 3.2vw, 1.875rem)",
                    "fourtitle": "clamp(0.8rem, 2.6vw, 1.5rem)"
                },
                "line-height": {
                    "tiny": 1.15,
                    "small": 1.2,
                    "medium": 1.4,
                    "normal": 1.6
                }
            }
        },
        "spacing": {
            "units": [
                "%",
                "px",
                "em",
                "rem",
                "vh",
                "vw"
            ]
        },
        "typography": {
            "dropCap": false,
            "fontFamilies": [
                {
                    "fontFamily": "\"PlayfairDisplay\", serif",
                    "name": "PlayfairDisplay",
                    "slug": "PlayfairDisplay",
                    "fontFace": [
                        {
                            "fontFamily": "PlayfairDisplay",
                            "fontWeight": "400",
                            "fontStyle": "normal",
                            "fontStretch": "normal",
                            "src": [
                                "file:./assets/fonts/playfair-display-v30-latin-regular.woff",
                                "file:./assets/fonts/playfair-display-v30-latin-regular.woff2"
                            ]
                        },
                        {
                            "fontFamily": "PlayfairDisplay",
                            "fontWeight": "700",
                            "fontStyle": "normal",
                            "fontStretch": "normal",
                            "src": [    
                                "file:./assets/fonts/playfair-display-v30-latin-700.woff",                     
                                "file:./assets/fonts/playfair-display-v30-latin-700.woff2"
                            ]
                        },
                        {
                            "fontFamily": "PlayfairDisplay",
                            "fontWeight": "900",
                            "fontStyle": "normal",
                            "fontStretch": "normal",
                            "src": [    
                                "file:./assets/fonts/playfair-display-v30-latin-900.woff",                     
                                "file:./assets/fonts/playfair-display-v30-latin-900.woff2"
                            ]  
                        }
                    ]
                },
                {
                    "fontFamily": "\"Montserrat\", sans-serif",
                    "name": "Montserrat",
                    "slug": "Montserrat",
                    "fontFace": [
                        {
                            "fontFamily": "Montserrat",
                            "fontWeight": "300",
                            "fontStyle": "normal",
                            "fontStretch": "normal",                 
                            "src": [                                
                                "file:./assets/fonts/montserrat-v25-latin-300.woff2",
                                "file:./assets/fonts/montserrat-v25-latin-300.woff"
                            ]
                        },
                        {
                            "fontFamily": "Montserrat",
                            "fontWeight": "400",
                            "fontStyle": "normal",
                            "fontStretch": "normal",
                            "src": [
                                "file:./assets/fonts/montserrat-v25-latin-regular.woff2",
                                "file:./assets/fonts/montserrat-v25-latin-regular.woff"
                            ]
                        },               
                        {
                            "fontFamily": "Montserrat",
                            "fontWeight": "700",
                            "fontStyle": "normal",
                            "fontStretch": "normal",
                            "src": [                                
                                "file:./assets/fonts/montserrat-v25-latin-700.woff2",
                                "file:./assets/fonts/montserrat-v25-latin-700.woff"
                            ]
                        }
                    ]
                },
                {
                    "fontFamily": "\"MontserratAlternates\", sans-serif",
                    "name": "MontserratAlternates",
                    "slug": "MontserratAlternates",
                    "fontFace": [
                        {
                            "fontFamily": "MontserratAlternates",
                            "fontWeight": "400",
                            "fontStyle": "normal",
                            "fontStretch": "normal",
                            "src": [
                                "file:./assets/fonts/montserrat-alternates-v17-latin-regular.woff",
                                "file:./assets/fonts/montserrat-alternates-v17-latin-regular.woff2"
                            ]
                        },
                        {
                            "fontFamily": "MontserratAlternates",
                            "fontWeight": "600",
                            "fontStyle": "normal",
                            "fontStretch": "normal",
                            "src": [
                                "file:./assets/fonts/montserrat-alternates-v17-latin-600.woff",
                                "file:./assets/fonts/montserrat-alternates-v17-latin-600.woff2"
                            ]
                        },
                        {
                            "fontFamily": "MontserratAlternates",
                            "fontWeight": "900",
                            "fontStyle": "normal",
                            "fontStretch": "normal",
                            "src": [
                                "file:./assets/fonts/montserrat-alternates-v17-latin-900.woff",
                                "file:./assets/fonts/montserrat-alternates-v17-latin-900.woff2"
                            ]
                        }
                    ]
                }
            ],
            "fontSizes": [
                {
                    "size": "0.94rem",
                    "slug": "small"
                },
                {
                    "size": "1rem",
                    "slug": "medium"
                },
                {
                    "size": "1.75rem",
                    "slug": "large"
                },
                {
                    "size": "clamp(1.75rem, 3vw, 2.25rem)",
                    "slug": "x-large"
                }
            ]
        },
        "layout": {
            "contentSize": "960px",
            "wideSize": "1200px"
        }
    },
    "styles": {
        "blocks": {
            "core/post-title": {
                "typography": {
                    "fontFamily": "var(--wp--preset--font-family--montserrat-alternates)",
                    "fontWeight": "900",
                    "lineHeight": "var(--wp--custom--typography--line-height--tiny)",
                    "fontSize": "var(--wp--custom--typography--font-size--title)"                    
                }       
            },
            "core/paragraph": {
                "typography": {
                    "fontFamily": "var(--wp--preset--font-family--montserrat)",
                    "fontWeight": "400"                  
                },
                "color": {
                    "text": "var(--wp--preset--color--gray-text)"
                }
            },   
            "core/columns": {
                "spacing": {
					"margin": {
						"top": "var(--wp--custom--spacing--large)",
						"bottom": "var(--wp--custom--spacing--large)"
					}
				}
            },
            "core/cover": {
                "spacing": {
                    "margin": {
                        "top": "var(--wp--custom--spacing--large)",
                        "bottom": "var(--wp--custom--spacing--large)"
                    }
                }
            },
            "core/media-text": {
                "spacing": {
                    "margin": {
                        "top": "var(--wp--custom--spacing--large)",
                        "bottom": "var(--wp--custom--spacing--large)"
                    }
                }
            },
            "core/post-comments": {
                "spacing": {
                    "padding": {
                        "top": "var(--wp--custom--spacing--small)"
                    }
                }
            },
            "core/pullquote": {
                "border": {
                    "width": "1px 0"
                }
            },
            "core/query-title": {
                "typography": {
                    "fontFamily": "var(--wp--preset--font-family--montserrat-alternates)",
                    "fontWeight": "600",
                    "lineHeight": "var(--wp--custom--typography--line-height--small)",
                    "fontSize": "var(--wp--custom--typography--font-size--title)"
                }
            },
            "core/quote": {
                "border": {
                    "width": "1px"
                }
            },
            "core/site-title": {
                "typography": {
                    "fontFamily": "var(--wp--preset--font-family--montserrat-alternates)",
                    "lineHeight": "var(--wp--custom--typography--line-height--normal)",
                    "fontSize": "var(--wp--preset--font-size--medium)",
                    "fontStyle": "normal",
                    "fontWeight": "normal"
                }
            }
        },
        "color": {
            "background": "var(--wp--preset--color--background)",
            "text": "var(--wp--preset--color--foreground)"
        },
        "elements": {
            "h1": {
                "typography": {
                    "fontFamily": "var(--wp--preset--font-family--montserrat-alternates)",
                    "fontWeight": "900",
                    "lineHeight": "var(--wp--custom--typography--line-height--tiny)",
                    "fontSize": "var(--wp--custom--typography--font-size--title)"
                }
            },
            "h2": {
                "typography": {
                    "fontFamily": "var(--wp--preset--font-family--montserrat-alternates)",
                    "fontWeight": "600",
                    "lineHeight": "var(--wp--custom--typography--line-height--small)",
                    "fontSize": "var(--wp--custom--typography--font-size--subtitle)"
                },
                "color": {
					"text": "var(--wp--preset--color--primary)"
				}
            },
            "h3": {
                "typography": {
                    "fontFamily": "var(--wp--preset--font-family--montserrat-alternates)",
                    "fontWeight": "600",
                    "lineHeight": "var(--wp--custom--typography--line-height--tiny)",
                    "fontSize": "var(--wp--custom--typography--font-size--thirdtitle)"
                }
            },
            "h4": {
                "typography": {
                    "fontFamily": "var(--wp--preset--font-family--montserrat-alternates)",
                    "fontWeight": "600",
                    "lineHeight": "var(--wp--custom--typography--line-height--tiny)",
                    "fontSize": "var(--wp--preset--font-size--medium)"
                }
            },
            "h5": {
                "typography": {
                    "fontFamily": "var(--wp--preset--font-family--montserrat-alternates)",
                    "fontWeight": "700",
                    "lineHeight": "var(--wp--custom--typography--line-height--normal)",
                    "fontSize": "var(--wp--preset--font-size--medium)"
                }
            },
            "h6": {
                "typography": {
                    "fontFamily": "var(--wp--preset--font-family--montserrat-alternates)",
                    "fontWeight": "400",
                    "lineHeight": "var(--wp--custom--typography--line-height--normal)",
                    "fontSize": "var(--wp--preset--font-size--medium)"
                }
            },
            "link": {
                "color": {
                    "text": "var(--wp--preset--color--primary)"
                }
            },
            "button": {
                "border": {
                    "radius": "24px",
                    "color": "var(--wp--preset--color--primary)",
                    "width": "2px",
                    "style": "solid"
                },
                "color": {
                    "background": "var(--wp--preset--color--background)",
                    "text": "var(--wp--preset--color--foreground)"
                },
                "typography": {
                    "fontSize": "var(--wp--preset--font-size--small)",
                    "fontWeight": "700",
                    "textTransform": "uppercase"
                },
                "spacing": {
                    "padding": {
                        "top": "var(--wp--custom--spacing--small--top)",
                        "bottom": "var(--wp--custom--spacing--small--bottom)",
                        "left": "var(--wp--custom--spacing--small--left)",
                        "right": "var(--wp--custom--spacing--small--right)"
                    }
                }, 
                ":hover": {
                    "color": {
                        "background": "var(--wp--preset--color--primary)",
                        "text": "var(--wp--preset--color--foreground)"
                    }
                }
            }            
        },
        "spacing": {
            "blockGap": "1.5rem"
        },
        "typography": {
            "fontFamily": "var(--wp--preset--font-family--montserrat)",
            "lineHeight": "var(--wp--custom--typography--line-height--normal)",
            "fontSize": "var(--wp--preset--font-size--medium)",
            "fontStyle": "normal",
            "fontWeight": "400"
        }
    },
    "templateParts": []
}

fonts.css :

/* montserrat-300 - latin */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: "Montserrat";
    font-style: normal;
    font-weight: 300;
    src: url("../fonts/montserrat-v25-latin-300.woff2") format("woff2"),
        /* Chrome 36+, Opera 23+, Firefox 39+ */ url("../fonts/montserrat-v25-latin-300.woff") format("woff"); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}

/* montserrat-regular - latin */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: "Montserrat";
    font-style: normal;
    font-weight: 400;
    src: url("../fonts/montserrat-v25-latin-regular.woff2") format("woff2"),
        /* Chrome 36+, Opera 23+, Firefox 39+ */ url("../fonts/montserrat-v25-latin-regular.woff") format("woff"); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}

/* montserrat-700 - latin */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: "Montserrat";
    font-style: normal;
    font-weight: 700;
    src: url("../fonts/montserrat-v25-latin-700.woff2") format("woff2"),
        /* Chrome 36+, Opera 23+, Firefox 39+ */ url("../fonts/montserrat-v25-latin-700.woff") format("woff"); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}

/* playfair-display-regular - latin */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: "Playfair Display";
    font-style: normal;
    font-weight: 400;
    src: url("../fonts/playfair-display-v30-latin-regular.woff2") format("woff2"),
        /* Chrome 36+, Opera 23+, Firefox 39+ */ url("../fonts/playfair-display-v30-latin-regular.woff") format("woff"); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}

/* playfair-display-700 - latin */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: "Playfair Display";
    font-style: normal;
    font-weight: 700;
    src: url("../fonts/playfair-display-v30-latin-700.woff2") format("woff2"),
        /* Chrome 36+, Opera 23+, Firefox 39+ */ url("../fonts/playfair-display-v30-latin-700.woff") format("woff"); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}

/* playfair-display-900 - latin */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: "Playfair Display";
    font-style: normal;
    font-weight: 900;
    src: url("../fonts/playfair-display-v30-latin-900.woff2") format("woff2"),
        /* Chrome 36+, Opera 23+, Firefox 39+ */ url("../fonts/playfair-display-v30-latin-900.woff") format("woff"); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}

/* montserrat-alternates-regular - latin */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: "Montserrat Alternates";
    font-style: normal;
    font-weight: 400;
    src: url("../fonts/montserrat-alternates-v17-latin-regular.woff2") format("woff2"),
        /* Chrome 36+, Opera 23+, Firefox 39+ */ url("../fonts/montserrat-alternates-v17-latin-regular.woff")
            format("woff"); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}

/* montserrat-alternates-600 - latin */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: "Montserrat Alternates";
    font-style: normal;
    font-weight: 600;
    src: url("../fonts/montserrat-alternates-v17-latin-600.woff2") format("woff2"),
        /* Chrome 36+, Opera 23+, Firefox 39+ */ url("../fonts/montserrat-alternates-v17-latin-600.woff") format("woff"); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}

CORS issue with JS file from manifest

Salut ๐Ÿ˜„

First of all, thanks for your work!
(have been struggling this weekend to find a valid Vite 5 WP theme / assets handling and after 3 or 4 others, i found yours)

I tried to load assets as you recommended:

image

Vite dev server is localhost:5173 and my Docker WP instance is localhost:8888
If you have any idea what's wrong, i'm all ears ๐Ÿ˜„
EDIT : i saw in your video, that you have HMR without using Vite Dev Server url... how is it possible? ๐Ÿค”

Issue

As you can see, the JS is blocked but not the CSS somehow ๐Ÿค”

image

Config

My WP setup:

  • Env: WSL2
  • Server: Docker WP environment using .wp-env.json (@wordpress/env) which i can access at localhost:8888
    (ex: localhost:8888/wp-login.php)
  • Frontend: Gutenberg (using FSE / blocks, i'm not using any kind of JS frameworks)
  • Theme: my source assets are in /src and my build assets are generated in /dist

Here is my vite.config.js:

// vite.config.js

import { defineConfig } from 'vite';
import { resolve } from 'path';

export default defineConfig({
	build: {
		minify: true,
		manifest: true,
		emptyOutDir: true,
		sourcemap: true,
		outDir: `dist/`,
		rollupOptions: {
			// overwrite default .html entry
			input: resolve(__dirname, 'src/index.js'),
		},
	},
	server: {
		strictPort: true,
		cors: true,
		port: 5173,
		hmr: {
			protocol: 'ws',
			port: 5173,
			clientPort: 8888,
		},
		proxy: {
			'/': {
				target: 'http://localhost:8888',
				changeOrigin: true,
				secure: false,
			},
		},
		watch: { usePolling: true, ignored: '/node_modules' },
	},
});

Watch development website on external devices

On my local i'm using Laravel Homestead to develop my websites.
Is it possible to watch the website you working on, on your mobile device?

I can't get this to work. Is there any workaround for this?

Working with Local

Has this been tested with Local?
In wp-config, I have define('WP_ENV', 'development');

However, when successfully running npm run dev, then clicking on the link, I get a 404: https://localhost:3000/wp-content/themes/press-wind/ can't be found in the browser.

BTW, npm run build seems to work fine. Regardless, setting define('WP_ENV', 'production'); or define('WP_ENV', 'development'); in wp-config results with assets being hashed.

Sync theme design with instances of blocks

Using apply is only method to keep in sync blocks right now? @ipatate
As developing on this FSE builder we find that block will lost all capabilities of updating from theme
Is there some approach that you recommend to use?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.