jamesfredley commented on code in PR #86:
URL: https://github.com/apache/grails-forge-ui/pull/86#discussion_r2868975112
##########
app/launch/vite.config.js:
##########
@@ -0,0 +1,34 @@
+import { defineConfig } from 'vite'
+import react from '@vitejs/plugin-react'
+import svgr from 'vite-plugin-svgr'
+import path from 'path'
+
+export default defineConfig({
+ plugins: [svgr(), react()],
+ base: './',
+ server: {
+ port: 3000,
+ open: true,
+ },
+ build: {
+ outDir: 'build',
+ },
+ resolve: {
+ alias: {
+ // @materializecss/materialize exports only JS in its package.json
"exports" field,
+ // so we alias direct CSS imports to the actual file paths.
+ '@materializecss/materialize/dist/css': path.resolve(
+ __dirname,
+ 'node_modules/@materializecss/materialize/dist/css'
+ ),
Review Comment:
This appears to be valid
The following should fix it
```
import { fileURLToPath } from 'url'
const __dirname = path.dirname(fileURLToPath(import.meta.url))
```
--
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]