Skip to content

Vite config dirname #122

Description

@alexmerlin

Bug Report

See below shell output.

The emptyOutDir warning is not a priority, as we agreed.

But, the one with __dirname you should look into.


Dev environment:

  • npm: 12.0.2
  • node: v24.21.0

Running npm run build on a clean install (no node_modules, no package-lock.json) I get the following output:

npm notice run light@1.0.0 build
npm notice run vite build
(!) Your Vite config uses features that are unsupported by `configLoader: 'native'`, which is planned to become the default in a future major version of Vite:
  - `__dirname` (vite.config.js:24:24). Use `import.meta.dirname` instead                                                                                                                                                                                             
Set `VITE_CONFIG_NATIVE_IGNORE_WARNING=true` to suppress this warning.                                                                                                                                                                                                
vite v8.3.0 building client environment for production...
✓ 4 modules transformed.

(!) outDir /var/www/light.dotkernel.localhost/html/public is not inside project root and will not be emptied.                                                                                                                                                         
Use --emptyOutDir to override.                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                      
[vite-plugin-static-copy] Copied 19 items.
computing gzip size...
public/css/app.css  236.24 kB │ gzip: 36.87 kB
public/js/app.js     79.67 kB │ gzip: 23.82 kB

✓ built in 2.34s

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions