@@ -84,7 +84,7 @@ pub fn command(mut options: Options) -> Result<()> {
8484 if std:: fs:: read_dir ( & template_target_path) ?. count ( ) > 0 {
8585 warn ! ( "Plugin dir ({:?}) not empty." , template_target_path) ;
8686 } else {
87- let ( tauri_dep, tauri_example_dep, tauri_build_dep) =
87+ let ( tauri_dep, tauri_example_dep, tauri_build_dep, tauri_plugin_dep ) =
8888 if let Some ( tauri_path) = options. tauri_path {
8989 (
9090 format ! (
@@ -99,12 +99,20 @@ pub fn command(mut options: Options) -> Result<()> {
9999 "{{ path = {:?} }}" ,
100100 resolve_tauri_path( & tauri_path, "core/tauri-build" )
101101 ) ,
102+ format ! (
103+ r#"{{ path = {:?}, features = ["build"] }}"# ,
104+ resolve_tauri_path( & tauri_path, "core/tauri-plugin" )
105+ ) ,
102106 )
103107 } else {
104108 (
105109 format ! ( r#"{{ version = "{}" }}"# , metadata. tauri) ,
106110 format ! ( r#"{{ version = "{}" }}"# , metadata. tauri) ,
107111 format ! ( r#"{{ version = "{}" }}"# , metadata. tauri_build) ,
112+ format ! (
113+ r#"{{ version = "{}", features = ["build"] }}"# ,
114+ metadata. tauri_plugin
115+ ) ,
108116 )
109117 } ;
110118
@@ -117,6 +125,7 @@ pub fn command(mut options: Options) -> Result<()> {
117125 data. insert ( "tauri_dep" , to_json ( tauri_dep) ) ;
118126 data. insert ( "tauri_example_dep" , to_json ( tauri_example_dep) ) ;
119127 data. insert ( "tauri_build_dep" , to_json ( tauri_build_dep) ) ;
128+ data. insert ( "tauri_plugin_dep" , to_json ( tauri_plugin_dep) ) ;
120129 data. insert ( "author" , to_json ( options. author ) ) ;
121130
122131 if options. tauri {
0 commit comments