Sam Garfinkel
09/10/2019, 2:52 PMrequires
with a single wrapper file? For example, the swagger-ui
, which is bundled with swagger-ui/dist/swagger.css
. The CSS should always be required whenever the swagger-ui
export is required. AFAIK you can only have a single @file:JsModule(...)
annotation.Svyatoslav Kuzmich [JB]
09/10/2019, 2:56 PM@JsModule
on them.Sam Garfinkel
09/10/2019, 2:56 PMrequire
?Svyatoslav Kuzmich [JB]
09/10/2019, 3:04 PMSam Garfinkel
09/10/2019, 3:06 PMSvyatoslav Kuzmich [JB]
09/10/2019, 3:10 PM@JsModule
😉Sam Garfinkel
09/10/2019, 3:24 PMThis annotation is not repeatable
. Is that a bug?Svyatoslav Kuzmich [JB]
09/10/2019, 3:33 PMSvyatoslav Kuzmich [JB]
09/10/2019, 3:37 PM@JsModule
on the same declaration?Sam Garfinkel
09/10/2019, 3:38 PM@JsModule
does not have the @Repeatable
annotation.Sam Garfinkel
09/10/2019, 3:40 PM@JsModule("swagger-ui")
@JsModule("swagger-ui/dist/swagger-ui.css")
external interface SwaggerUI {
...
}
Svyatoslav Kuzmich [JB]
09/10/2019, 4:12 PM@JsModule
is meant to import JS modules, it isn't a general replacement for require
.Sam Garfinkel
09/10/2019, 4:29 PMkotlinext.js.require
function, although to be fair this is a fairly common use case in webpack. Common enough it would be nice to have something first-class for it.Darren Bell
10/14/2019, 2:31 PMSam Garfinkel
10/21/2019, 3:12 PMconst fooCss = kotlinext.js.require("foo.css")
, or if its associated with, say, a react component, put it in the init block for that component