Skip to content

static:generate use the node dev server in place of the generated files by vite  #2060

@a-kla

Description

@a-kla

Tempest version

2.14

PHP version

8.4

Operating system

Linux

Description

I try to build a static Page with Vite.

$ pnpm build

> @ build /workspaces/node-playwright/test-tempst
> vite build

vite v8.0.1 building client environment for production...
✓ 3 modules transformed.
computing gzip size...
public/build/manifest.json                       0.37 kB │ gzip: 0.16 kB
public/build/assets/main-BmsNWnvI.css            6.21 kB │ gzip: 1.93 kB
public/build/assets/main.entrypoint-BY3IQ6qW.js  0.02 kB │ gzip: 0.04 kB

✓ built in 131ms
$ ./tempest static:generate --crawl

// GENERATING STATIC PAGES
/ .............................................................................................................. 3 DEAD LINKS
Failures .................................................................................................................. 1
Static pages generated .................................................................................................... 0

// DEAD LINKS
/ ......................................................................................................................... #
/ ......................................................................................................................... #
/ ......................................................................................................................... #

Without --crawl it generates the page but with:

<script type="module" src="http://[::]:5173/@vite/client"></script>
<script type="module" src="http://[::]:5173/src/main.entrypoint.ts"></script>
<link rel="stylesheet" href="http://[::]:5173/src/main.entrypoint.css" />

expected:

<script type="module" src="assets/main.entrypoint-BY3IQ6qW.js" />
<link rel="stylesheet" href="assets/main-BmsNWnvI.css" />

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions