Replies: 2 comments 3 replies
-
Hey @DavidZudu, from the screenshot, it looks like your WordPress root URL and paths may be set up incorrectly. Additionally, the asset file names should include a hash after having run |
Beta Was this translation helpful? Give feedback.
-
I wanted to share how I deployed Flynt from Local to production. I use Wpvivid free migration plugin to upload and deploy to a new website. After running 'npm run build' or 'npm run build:production' command you will see a new folder named themes/flynt-theme/dist/assets. In this folder you will find files 4 files you need to enqueue to the website: 1. main-xxxxx.css 2. print-xxxx.css 3. admin-xxxxx.js 4. admin-xxxx.css Now you need to update how the files are enqueued for deployment in themes/flynt-theme/inc/assets.php. Here is how the code looks in assets.php . You'll need to manually change assets.php file based upon production or development. The below example is for development with production commented out. `// enqueue files for development add_action('admin_enqueue_scripts', function () {
wp_enqueue_style('Flynt/assets/admin', Asset::requireUrl('assets/admin.scss'), [], null); Hope this helps. Dave |
Beta Was this translation helpful? Give feedback.
-
All working fine locally, I then stop the watcher, run "npm run build", and upload the theme via FTP to a test site for the client at a sub directory ("dev.example.com/clientname"). I don't upload the node_modules folder.
Everything seems to work except the css and js files are 404ing. Looking at console i get the following:
Any idea what could be causing this? What I'm missing? I've tried the same but with updating the vite.config wordpressHost variable to the target url before building (not even sure if that does anything relevant).
The same process worked pre 2.0 - this is my first 2.0 theme.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions