Skip to content

Project name with ' fails on wxt command #1697

@hyunbinseo

Description

@hyunbinseo

Describe the bug

Project name with ' fails on wxt command:

ERROR [vite:define] Transform failed with 1 error:
virtual:wxt-background-entrypoint?existing-path-removed/hello'/entrypoints/background.ts:1:59:

ERROR: Expected ";" but found "/"
file: virtual:wxt-background-entrypoint?existing-path-removed/hello'/entrypoints/background.ts

Reproduction

Reference the following section:

Steps to reproduce

pnpm dlx wxt@latest init

# WXT 0.20.6
# ℹ Initializing new project
# √ Project Directory ... hello'
# √ Choose a template » vanilla
# √ Package Manager » pnpm
# ✔ Downloading template

# ✨ WXT project created with the vanilla template.

# Next steps:
#   1. cd hello' - does not work in PowerShell x Windows
#   2. pnpm install
cd "hello'" # requires "" around the path
pnpm i && pnpm dev

# WXT 0.20.6
# ✔ Started dev server @ http://localhost:3000
# ℹ Pre-rendering chrome-mv3 for development with Vite 6.3.5
# ✗ Build failed in 10ms

# ERROR  [vite:define] Transform failed with 1 error:
# virtual:wxt-background-entrypoint?existing-path-removed/hello'/entrypoints/background.ts:1:59:

# ERROR: Expected ";" but found "/"
# file: virtual:wxt-background-entrypoint?existing-path-removed/hello'/entrypoints/background.ts

System Info

System:
  OS: Windows 11 10.0.26100
  CPU: (8) x64 Intel(R) Core(TM) Ultra 7 258V
  Memory: 8.21 GB / 31.51 GB
Binaries:
  Node: 24.1.0 - ~\AppData\Local\fnm_multishells\46852_1748823685102\node.EXE
  Yarn: 1.22.22 - ~\AppData\Local\fnm_multishells\46852_1748823685102\yarn.CMD
  npm: 11.3.0 - ~\AppData\Local\fnm_multishells\46852_1748823685102\npm.CMD
  pnpm: 10.11.0 - ~\AppData\Local\fnm_multishells\46852_1748823685102\pnpm.CMD
Browsers:
  Edge: Chromium (131.0.2903.112)

Used Package Manager

pnpm

Validations

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions