JSPM

@astrojs/compiler

0.7.4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 688306
  • Score
    100M100P100Q191609F
  • License MIT

Package Exports

  • @astrojs/compiler
  • @astrojs/compiler/astro.wasm

Readme

Astro Compiler

Astro’s Go + WASM compiler.

⚠️ Currently in beta!

Install

npm install @astrojs/compiler

Usage

Note: API will change before 1.0! Use at your own discretion.

import { transform } from '@astrojs/compiler';

const result = await transform(source, {
  site: 'https://mysite.dev',
  sourcefile: '/Users/astro/Code/project/src/pages/index.astro',
  sourcemap: 'both',
  internalURL: 'astro/internal',
});

Contributing

CONTRIBUTING.md