think/packages/client/next.config.js

29 lines
817 B
JavaScript
Raw Normal View History

2022-03-12 10:31:03 +08:00
const semi = require('@douyinfe/semi-next').default({});
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
const { getConfig } = require('@think/config');
2022-02-20 19:51:55 +08:00
const config = getConfig().client;
/** @type {import('next').NextConfig} */
const nextConfig = semi({
reactStrictMode: true,
assetPrefix: config.assetPrefix,
env: {
SERVER_API_URL: config.apiUrl,
COLLABORATION_API_URL: config.collaborationUrl,
ENABLE_ALIYUN_OSS: config?.oss?.aliyun?.accessKeyId,
2022-02-20 19:51:55 +08:00
},
webpack: (config, { dev, isServer }) => {
config.resolve.plugins.push(new TsconfigPathsPlugin());
return config;
},
eslint: {
ignoreDuringBuilds: true,
},
2022-03-21 19:55:06 +08:00
// FIXME: douyinfe 的第三方包存在 ts 类型错误!
typescript: {
ignoreBuildErrors: true,
},
2022-02-20 19:51:55 +08:00
});
module.exports = nextConfig;