@@ -11,6 +11,7 @@ import {
1111 uniEncryptUniModulesAssetsPlugin ,
1212 uniEncryptUniModulesPlugin ,
1313 uniHBuilderXConsolePlugin ,
14+ uniSharedDataPlugin ,
1415 uniUTSAppUniModulesPlugin ,
1516 uniUTSUVueJavaScriptPlugin ,
1617 uniUniModulesExtApiPlugin ,
@@ -26,6 +27,7 @@ import { uniAppPagesPlugin } from '../js/pagesJson'
2627import { replaceExtApiPagePaths } from '../js/extApiPages'
2728
2829export function init ( ) {
30+ const isDom2 = process . env . UNI_APP_X_DOM2 === 'true'
2931 return [
3032 ...( isNormalCompileTarget ( )
3133 ? [ uniWorkersPlugin ( ) , uniDecryptUniModulesPlugin ( ) ]
@@ -53,6 +55,7 @@ export function init() {
5355 ] ) ,
5456 uniUTSUVueJavaScriptPlugin ( ) ,
5557 resolveUTSCompiler ( ) . uts2js ( {
58+ dom2 : isDom2 ,
5659 platform : 'app-ios' ,
5760 inputDir : process . env . UNI_INPUT_DIR ,
5861 version : process . env . UNI_COMPILER_VERSION ,
@@ -68,6 +71,7 @@ export function init() {
6871 } ,
6972 } ,
7073 } ) ,
74+ ...( isDom2 ? [ uniSharedDataPlugin ( ) ] : [ ] ) ,
7175 ...( process . env . UNI_COMPILE_EXT_API_TYPE === 'pages'
7276 ? [ replaceExtApiPagePaths ( ) ]
7377 : [ ] ) ,
0 commit comments