我正在使用 next-compose-plugins
,当我尝试构建 nextjs 应用程序时,它抛出错误:
运行时错误:未捕获的错误:模块解析失败:保留关键字“接口”。 您可能需要一个合适的加载器来处理此文件类型,目前没有配置加载器来处理此文件。
const nextConfig = {
distDir: "../../build",
async headers() {
return [
{
source: '*',
headers: [
{
key: 'x-custom-header',
value: 'my custom header value',
},
{
key: 'x-another-custom-header',
value: 'my other custom header value',
},
],
},
]
},
}
module.exports = withPlugins(
[withCSS], [withSaas], [withImages], [nextSourceMaps], [withTM],
{
webpack: (config, { isServer }) => {
config.optimization.minimizer = [];
config.optimization.minimizer.push(new OptimizeCSSAssetsPlugin({}));
if (!isServer) {
config.resolve.alias["@sentry/node"] = "@Sentry (Legacy)/browser";
}
return config;
},
}, nextConfig);
我正在使用 react-jss
,我认为这是我缺少的配置。我不确定我的配置有什么问题。任何帮助将不胜感激。谢谢。