Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
weex-loader
Advanced tools
A webpack loader for Weex.
npm install weex-loader babel-loader --save
.we
file..js/.css/.html
) via src
attribute..we
file.weex-components
under v0.1, please update it to v0.2.@weex-module/xxxx
in .js
file. see issue.we
file.make a webpack config
module.exports = {
entry: './main.we?entry',
output: {
path: './dist',
filename: 'main.js'
},
module: {
loaders: [
{
test: /\.we(\?[^?]+)?$/,
loader: 'weex'
}
]
}
};
specify src
attribute
<template src="./main.html"></template>
<style src="./main.css"></style>
<script src="./main.js"></script>
append a weex config in webpack config
weex: {
lang: {
jade: ['jade-html'] // a jade langauge will chain "jade-html-loader"
}
}
main.we
<template lang="jade">
div
text Hello Weex
</template>
.we
file as component elementpath/to/component.we
in script
like require('./foo.we')
or write inline element like <element name="foo" src="./foo.we"></element>
.template
like <foo></foo>
.<element name="foo" src="./foo.we"></element>
<template>
<div>
<foo></foo>
<bar></bar>
</div>
</template>
<script>
require('./bar.we')
</script>
require('./foo.we?name="fooo"')
. Or specify a name attribute in element, like <element name="fooo" src="./foo.we" ></element>
template
like <fooo></fooo>
.<element name="fooo" src="./foo.we"></element>
<template>
<div>
<fooo></fooo>
<baar></baar>
</div>
</template>
<script>
require('./bar.we?name=baar')
</script>
npm run test
will run mocha testing.
And you can check the specs in test/spec
folder.
src
attrBug
Source Map Offset. Encoding to this problem, please use devtool:"eval-source-map"
instead of devtool:"source-map"
.Bug
Can't set debugger breakpoint. I still don't know the reason, but you can debug with debugger
keyword.FAQs
a webpack loader for weex
The npm package weex-loader receives a total of 40 weekly downloads. As such, weex-loader popularity was classified as not popular.
We found that weex-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 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.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.