mirror of
https://github.com/antvis/chart-visualization-skills.git
synced 2026-09-14 15:58:00 +08:00
fd3cf2b2f3
* chore: 添加 scale sequential 约束 * chore: strokeWidth 修改为 lineWidth
29 lines
979 B
TypeScript
29 lines
979 B
TypeScript
import type { NextConfig } from 'next';
|
|
import { config as loadEnv } from 'dotenv';
|
|
import path from 'path';
|
|
|
|
// Load the root-level .env so the playground doesn't need its own copy.
|
|
// so shell exports and CI secrets always take precedence.
|
|
loadEnv({ path: path.resolve(__dirname, '../.env'), override: true });
|
|
|
|
const nextConfig: NextConfig = {
|
|
// Keep the package as external so fs/path/__dirname work correctly at runtime
|
|
serverExternalPackages: ['@antv/chart-visualization-skills'],
|
|
// Force externalize the workspace package (serverExternalPackages alone doesn't work for workspace:* packages)
|
|
webpack: (config, { isServer }) => {
|
|
if (isServer) {
|
|
config.externals = config.externals || [];
|
|
config.externals.push('@antv/chart-visualization-skills');
|
|
}
|
|
return config;
|
|
},
|
|
// Experimental features for server components
|
|
experimental: {
|
|
serverActions: {
|
|
allowedOrigins: ['localhost:3000']
|
|
}
|
|
}
|
|
};
|
|
|
|
export default nextConfig;
|