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.
@amagaki/amagaki-engine-preact
Advanced tools
[![NPM Version][npm-image]][npm-url] [![TypeScript Style Guide][gts-image]][gts-url]
An Amagaki plugin for using Preact (TSX) for template rendering. Supports server-side rendering (SSR) and (optionally) hydration.
This engine can be used to bring React into an Amagaki project with minimal overhead, and you can choose whether to also use it on your site's frontend. Page modules can be created entirely using React components (via Preact) and integrate seamlessly with frontend components also built in React.
@amagaki/amagaki-plugin-page-builder
.npm install --save \
@amagaki/amagaki-engine-preact \
@amagaki/amagaki-plugin-page-builder
amagaki.ts
.import {PageBuilder} from '@amagaki/amagaki-plugin-page-builder';
import {Pod} from '@amagaki/amagaki';
import {PreactEnginePlugin} from '../src';
export default (pod: Pod) => {
PreactEnginePlugin.register(pod);
PageBuilder.register(pod, {
partialPaths: {
css: ['/dist/css/${partial.partial}/${partial.partial}.css'],
js: ['/dist/js/partials/${partial.partial}/${partial.partial}.js'],
view: ['/src/partials/${partial.partial}/${partial.partial}.tsx'],
},
});
};
If your partial requires hydration:
a. Add to your frontend's main.tsx
.
import {PartialHydrator} from '@amagaki/amagaki-engine-preact';
// Import all partials that require hydration.
import Hero from './partials/Hero';
PartialHydrator.register({
components: {
'Hero': Hero,
},
});
b. Ensure includeContext: true
is supplied in YAML files for any partial
that requires hydration.
partials:
- partial: Hero
includeContext: true
headline: Hello World!
FAQs
[![NPM Version][npm-image]][npm-url] [![TypeScript Style Guide][gts-image]][gts-url]
We found that @amagaki/amagaki-engine-preact 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.
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.