Skip to content

🐛 BUG: @cloudflare/vite-plugin ignore run_worker_first #8430

Closed
@sammdec

Description

@sammdec

Which Cloudflare product(s) does this pertain to?

Vite Plugin

What versions are you using?

0.1.9 [@cloudflare/vite-plugin]

What operating system and version are you using?

Mac Sequoia 15.3.1

Please provide a link to a minimal reproduction

No response

Describe the Bug

Using the create cloudflare@latest --template react-swc-ts and adding the following assets config to the wrangler.jsonc

"assets": {
        "not_found_handling": "single-page-application",
	"binding": "ASSETS",
	"run_worker_first": true
	},

Then removing the following line from the worker

return Response.json({
      message: "Hello world",
    });

    // return env.ASSETS.fetch(request);

You will find it still continues to serve the index.html rather than returning "Hello world"

Please provide any relevant error logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that isn't workingerror-messagingImproving user facing error messagesvite-pluginRelating to the `@cloudflare/vite-plugin` package

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions