LauraXia123 commented on issue #6441:
URL: https://github.com/apache/gravitino/issues/6441#issuecomment-2684022179
1. It show that caniuse-lite is used in next production, not gravitino
production. A dependency of next.js, which is a indirect dependency of
gravitino. The indirect dependency maybe work for the final app project, maybe
not. To analyze build files mapping the source code is to prove that is not
there.
2. I modified the build file configuration entry a bit
`const nextConfig = {
...(isProdEnv
? {}
: {
// ** Just for development
async rewrites() {
return {
fallback: [
{
source: '/api/:path*',
destination: `${apiUrl}/api/:path*`
},
{
source: '/configs',
destination: `${apiUrl}/configs`
},
{
source: `${oauthPath}`,
destination: `${oauthUri}${oauthPath}`
}
]
}
}
}),
output: process.env.OUTPUT_MODE || 'standalone',
basePath: process.env.BASE_PATH,
distDir: process.env.DIST_DIR,
trailingSlash: false,
reactStrictMode: true,
productionBrowserSourceMaps: true,
webpack: (config, { isServer }) => {
if (!isServer) {
// disable TerserPlugin
config.optimization.minimizer = []
// disable Tree Shaking
config.optimization.usedExports = false
// disable code segmentation
config.optimization.splitChunks = false
// reserved module paths
config.output.devtoolModuleFilenameTemplate = function (info) {
return 'file:///' + encodeURI(info.absoluteResourcePath)
}
}
return config
}
}`
and run `pnpm dist`, it will work.
<img width="678" alt="Image"
src="https://github.com/user-attachments/assets/cbb03892-04c8-4f30-8a7d-cd2a8b31cebe"
/>
above is the result by `find ./dist/ui -exec grep caniuse {} \;`, Is this as
expected?
--
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]