是否有任何方法来扩展process.env.NODE_ENV,以便不同的环境变量在不同的构建中。据我所知,这段代码process.env.NODE_ENV === 'staging'产生这个错误This condition will always return 'false' since thetypes '"production" | "test"' and '"staging&quo
我的问题是,process.env.NODE_ENV只有两种类型,development和production,而且我也想选择staging。This condition will always return 'false' since the types '"production"' and '"staging"' have no overlap.ts(2367)
export const baseURL
我正在构建React组件,为了使我的代码更易于开发人员使用,我包括如下内容: setTimeout(() => { console.warn("ComponentX might be stuck. This may mean you forget such and such.");}
这样做的目的是帮助开发人员更快地发现常见的错误。有没有一种方法来标记这个代码,让webpack简单地把它排除在生