2022-02-20 11:51:55 +00:00
|
|
|
const semi = require("@douyinfe/semi-next").default({});
|
|
|
|
const TsconfigPathsPlugin = require("tsconfig-paths-webpack-plugin");
|
|
|
|
const { getConfig } = require("@think/config");
|
|
|
|
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,
|
2022-02-22 15:22:39 +00:00
|
|
|
ENABLE_ALIYUN_OSS: config?.oss?.aliyun?.accessKeyId,
|
2022-02-20 11:51:55 +00:00
|
|
|
},
|
|
|
|
webpack: (config, { dev, isServer }) => {
|
|
|
|
config.resolve.plugins.push(new TsconfigPathsPlugin());
|
|
|
|
return config;
|
|
|
|
},
|
|
|
|
eslint: {
|
|
|
|
ignoreDuringBuilds: true,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
module.exports = nextConfig;
|