
Research
Security News
Malicious npm Packages Use Telegram to Exfiltrate BullX Credentials
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
babel-plugin-transform-vue-template
Advanced tools
Compile Vue template at build time via babel plugin.
yarn add babel-plugin-transform-vue-template --dev
yarn add vue-template-compiler --dev
# vue-template-compiler is required as peer dependency
With .babelrc
:
{
"plugins": ["transform-vue-template"]
}
Then every object property template
whose value is a template string literal will be compiled to render
function at build time:
export default {
template: `<div>
<button @click="whatever">Click me!</button>
</div>`,
methods: {
whatever() {
// do whatever
}
}
}
Compiled code:
export default {
render: function render() {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('div', [_c('button', {
on: {
"click": _vm.whatever
}
}, [_vm._v("Click me!")])]);
},
staticRenderFns: [],
methods: {
whatever() {// do whatever
}
}
};
This plugin also handles tagged template expression, it simply ignores the tag:
export default {
template: html`<div>{{ message }}</div>`
}
Note that the tag name can only be html
.
Add a comment block with @transform-disable
to the previous line:
export default {
// @transform-disable
template: `<div></div>`
}
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
babel-plugin-transform-vue-template © egoist, Released under the MIT License.
Authored and maintained by egoist with help from contributors (list).
egoist.moe · GitHub @egoist · Twitter @_egoistlily
FAQs
as you can tell from the name.
The npm package babel-plugin-transform-vue-template receives a total of 261 weekly downloads. As such, babel-plugin-transform-vue-template popularity was classified as not popular.
We found that babel-plugin-transform-vue-template demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.
Security News
AI-generated slop reports are making bug bounty triage harder, wasting maintainer time, and straining trust in vulnerability disclosure programs.