Skip to content

How to add preset for custom bundle of wp.data #520

@eliot-akira

Description

@eliot-akira

I'd like to add a new preset that creates a custom bundle with a set of plugins and content loaded.

Following #501 about adding a beta preset, I added my own 6.2-custom preset in those places, particularly:

  • packages/playground/compile-wordpress/build.js
  • packages/playground/remote/src/lib/get-wordpress-module.ts

And a conditional clause in compile-wordpress/Dockerfile to handle this preset, installing plugins, importing content from WXR file.

I'm able to build the preset with the following command:

npx nx recompile-wordpress playground-remote --preset=6.2-custom

Everything builds, except for the hashed wp-6.2-custom-*.data in dist/packages/playground/remote/assets.

  • In packages/playground/remote/public, there's a newly created folder wp-6.2-custom.
  • In packages/playground/remote/src/wordpress, there are wp-6.2-custom.data and wp-6.2-custom.js.

Somehow this .data file is not getting copied to a hashed file name in dist.

EDIT: Weirdly, the built files in public and src/wordpress are owned by root user. That might be related to why the .data file isn't being copied to its destination in dist.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions