
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
ractive-component-loader
Advanced tools
Exports a Ractive component as a Ractive constructor function for webpack.
Install this into your project:
$ npm install --save ractive-component-loader
Make all your .html
files compile down to [Ractive] templates by
modifying your webpack.config.js
file:
/* webpack.config.js */
module.exports = {
module: {
loaders: [
{ test: /\.html$/, loader: 'ractive-component' }
]
},
...
};
Then use your Ractive components via require()
:
<!-- mycomponent.html -->
<import rel="ractive" href="./subcomponent.html">
<div>Hello {{subject}}!</div>
<subcomponent></subcomponent>
<script>
component.exports = {
data: { subject: 'World' }
};
</script>
<!-- subcomponent.html -->
Subcomponent are required correctly
var Component = require('./mycomponent.html');
new Component({ el: document.body });
You can also use it without modifying your config. Just explicitly call it on
your require()
call via a prefix:
var Component = require('ractive-component!./mycomponent.html');
ractive-component-loader © 2014+, Blake Thomson. Released under the MIT License.
Authored and maintained by Blake Thomson with help from contributors (list).
FAQs
ractive component loader module for webpack
We found that ractive-component-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.