diff options
author | Sebastian <sebasjm@gmail.com> | 2023-05-05 08:47:00 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-05-05 08:52:58 -0300 |
commit | d03bfa714b4a08c9a9002cdc8999f7981f2b2de6 (patch) | |
tree | 4f6f387892493d11d7b6371d992ffe90046a30ad /packages/taler-wallet-webextension/trim-extension.cjs | |
parent | b64bb455a2d51f7e19e517c0bd158ff7d7d9557f (diff) | |
download | wallet-core-d03bfa714b4a08c9a9002cdc8999f7981f2b2de6.tar.gz wallet-core-d03bfa714b4a08c9a9002cdc8999f7981f2b2de6.tar.bz2 wallet-core-d03bfa714b4a08c9a9002cdc8999f7981f2b2de6.zip |
fixing web-utils new imports
Diffstat (limited to 'packages/taler-wallet-webextension/trim-extension.cjs')
-rw-r--r-- | packages/taler-wallet-webextension/trim-extension.cjs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/packages/taler-wallet-webextension/trim-extension.cjs b/packages/taler-wallet-webextension/trim-extension.cjs index 00e8f9f01..256a9f48d 100644 --- a/packages/taler-wallet-webextension/trim-extension.cjs +++ b/packages/taler-wallet-webextension/trim-extension.cjs @@ -1,7 +1,9 @@ // Simple plugin to trim extensions from the filename of relative import statements. -// Required to get linaria to work with `moduleResulution: "Node16"` imports. +// Required to get linaria to work with `moduleResolution: "Node16"` imports. // @author Florian Dold -module.exports = function({ types: t }) { +// + +module.exports = function ({ types: t }) { return { name: "trim-extension", visitor: { @@ -9,15 +11,15 @@ module.exports = function({ types: t }) { const src = x.node.source; if (src.value.startsWith(".")) { if (src.value.endsWith(".js")) { - const newVal = src.value.replace(/[.]js$/, "") + const newVal = src.value.replace(/[.]js$/, ""); x.node.source = t.stringLiteral(newVal); } } if (src.value.endsWith(".jsx")) { - const newVal = src.value.replace(/[.]jsx$/, "") + const newVal = src.value.replace(/[.]jsx$/, ""); x.node.source = t.stringLiteral(newVal); } }, - } + }, }; -} +}; |