Swift vapor 3 ViewRenderer 错误
Swift vapor 3 ViewRenderer error
那是错误
Please choose which ViewRenderer you prefer, multiple are available: PlaintextRenderer, LeafRenderer.
那是我在 configure.swift
中的代码
try services.register(LeafProvider())
config.prefer(LeafRenderer.self, for: TemplateRenderer.self)
叶子添加到 Package.swift
.target(name: "App", dependencies: ["Vapor", "FluentSQLite", "Crypto", "Leaf"]),
尽管我做了 vapor xcode , Build 和 运行也是,但是还是不行。
// As of Vapor 3.0.1 and Leaf 3.0.0-rc.2.2
config.prefer(LeafRenderer.self, for: ViewRenderer.self)
那是错误
Please choose which ViewRenderer you prefer, multiple are available: PlaintextRenderer, LeafRenderer.
那是我在 configure.swift
中的代码try services.register(LeafProvider())
config.prefer(LeafRenderer.self, for: TemplateRenderer.self)
叶子添加到 Package.swift
.target(name: "App", dependencies: ["Vapor", "FluentSQLite", "Crypto", "Leaf"]),
尽管我做了 vapor xcode , Build 和 运行也是,但是还是不行。
// As of Vapor 3.0.1 and Leaf 3.0.0-rc.2.2
config.prefer(LeafRenderer.self, for: ViewRenderer.self)