File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed
Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -167,7 +167,24 @@ const config = {
167167 } ,
168168 } ) ,
169169
170- plugins : [ "docusaurus-plugin-sass" ] ,
170+ plugins : [
171+ "docusaurus-plugin-sass" ,
172+ function envDefinePlugin ( ) {
173+ return {
174+ name : "env-define-plugin" ,
175+ configureWebpack ( ) {
176+ const webpack = require ( "webpack" ) ;
177+ return {
178+ plugins : [
179+ new webpack . DefinePlugin ( {
180+ "process.env.REGION" : JSON . stringify ( process . env . REGION || "cn" ) ,
181+ } ) ,
182+ ] ,
183+ } ;
184+ } ,
185+ } ;
186+ } ,
187+ ] ,
171188} ;
172189
173190module . exports = config ;
Original file line number Diff line number Diff line change 11export const BRAND : string = "leancloud" ;
2- export const REGION : string = "cn" ;
2+ export const REGION : string = process . env . REGION || "cn" ;
33
44// Cloud Engine
55export const CLI_BINARY : string = BRAND === "tds" ? "tds" : "lean" ;
You can’t perform that action at this time.
0 commit comments