bito-code-review[bot] commented on PR #86:
URL: https://github.com/apache/grails-forge-ui/pull/86#issuecomment-3979378171
<!-- Bito Reply -->
You're correct—__dirname is undefined in Node.js ESM modules. Replace it
with path.dirname(fileURLToPath(import.meta.url)) and import fileURLToPath from
'url'.
**app/launch/vite.config.js**
```
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import svgr from 'vite-plugin-svgr'
import path from 'path'
import { fileURLToPath } from 'url'
export default defineConfig({
// ... other config
resolve: {
alias: {
'@materializecss/materialize/dist/css': path.resolve(
path.dirname(fileURLToPath(import.meta.url)),
'node_modules/@materializecss/materialize/dist/css'
),
},
},
// ... rest
})
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]