Skip to content

The CJS build of Vite's Node API is deprecated. #6652

@lcsd

Description

@lcsd

[REQUIRED] Environment info

firebase-tools: 13.0.2

Platform: Ubuntu

[REQUIRED] Test case

$> VITE (VUE3) start app , config VueFire with auth and hosting
$> firebase experiments:enabled webframeworks
$> firebase init hosting auth

[REQUIRED] Steps to reproduce

$> firebase emulators: start => ERRORS BUT
$> firebase deploy => deploys OK with folowinf MSG (from Vite 5.0)
"The CJS build of Vite's Node API is deprecated. See
https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated
for more details."

[REQUIRED] Expected behavior

No more CJS (node require) in firebase code

[REQUIRED] Actual behavior

  "The CJS build of Vite's Node API is deprecated. See 
          https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated
   for more details."

** MY firebase.json file;** see rewrites following Vite instructions for FireBase Deploy.

{
  "hosting": {
    "source": ".",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ],
    "frameworksBackend": {
      "region": "us-east1"
    },
    "site": "g2ato-v3p1-fb",
    "rewrites": [{
      "source": "**",
      "destination": "/index.html"
    }],
    "redirects": [],
    "headers": [{
        "source": "**/*.[jt]s",
        "headers": [{
            "key": "Set-Cookie",
            "value": "__FIREBASE_DEFAULTS__=xxx...;"
     }],
    "cleanUrls": true,
    "webFramework": "vite"
  },
  "emulators": {
    "hosting": {
      "port": 5000
    },
    "singleProjectMode": true
  }
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions