Skip to content

plugins does not hande $GLOBALS correctly #53

Description

@mathiasdg

see the code example below. If i run this on the vite dev server with this plugin, it prints null.
When i run this same code on my local apache server it prints the string as is should.

$tbd = 'date has yet to be set';

function formatDate(string $datum): string
{
    var_dump($GLOBALS['tbd']);

...
}

Is this a bug? Or is there another way to use PHP globals with Vite?
Is there a workaround?

Thanks a lot!
Love the plugin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions