File tree Expand file tree Collapse file tree 5 files changed +13
-8
lines changed
bindings/devup-ui-wasm/src Expand file tree Collapse file tree 5 files changed +13
-8
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @devup-ui/webpack-plugin " : patch
3+ " @devup-ui/wasm " : patch
4+ ---
5+
6+ Fix convert issue
Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ pub struct Output {
2020extern "C" {
2121 #[ wasm_bindgen( js_namespace = console) ]
2222 fn log ( s : & JsValue ) ;
23+ #[ wasm_bindgen( js_namespace = console, js_name = log) ]
24+ fn log_str ( s : & str ) ;
2325}
2426
2527#[ wasm_bindgen]
@@ -100,11 +102,7 @@ pub fn code_extract(
100102 } ,
101103 ) {
102104 Ok ( output) => Ok ( Output {
103- code : if output. styles . is_empty ( ) {
104- code. to_string ( )
105- } else {
106- output. code
107- } ,
105+ code : output. code ,
108106 styles : output. styles ,
109107 } ) ,
110108 Err ( error) => Err ( JsValue :: from_str ( error. to_string ( ) . as_str ( ) ) ) ,
Original file line number Diff line number Diff line change 2525 "./css-loader" : {
2626 "import" : " ./dist/css-loader.js" ,
2727 "require" : " ./dist/css-loader.cjs"
28- }
28+ },
29+ "./dist/*" : " ./dist/*"
2930 },
3031 "files" : [
3132 " dist"
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ const devupUILoader: RawLoaderDefinitionFunction<DevupUILoaderOptions> =
2727
2828 try {
2929 const { code, css } = codeExtract (
30- this . resourcePath ,
30+ id ,
3131 source . toString ( ) ,
3232 libPackage ,
3333 cssFile ,
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ export class DevupUIWebpackPlugin {
3030 cssFile = join ( _dirname , 'devup-ui.css' ) ,
3131 devupPath = 'devup.json' ,
3232 interfacePath = '.df' ,
33- } : Partial < DevupUIWebpackPluginOptions > ) {
33+ } : Partial < DevupUIWebpackPluginOptions > = { } ) {
3434 this . options = {
3535 package : libPackage ,
3636 cssFile,
You can’t perform that action at this time.
0 commit comments