Skip to content

[6.x]: $styles and $scripts defined in the plugin are not published automatically when the plugin is installed and enabled. #19036

@vnali

Description

@vnali

What happened?

Description

I defined $scripts and $styles in the plugin.

    public array $styles = [
           __DIR__.'/../resources/css/test.css' => 'css/test.css',
    ];

    public array $scripts = [
            __DIR__.'/../resources/js/test.js' => 'js/test.js',
    ];

When I install/enable the plugin, those files are not published to the vendor folder. I can publish them manually with ddev artisan vendor:publish by selecting plugin tag though.

However I can confirm the plugin vendor folder is removed when the plugin is uninstalled/disabled.

Craft CMS version

6.0.0-alpha.6

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

Metadata

Metadata

Assignees

No one assigned

    Labels

    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