JSPM

docpad-plugin-react

2.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q22254F

DocPad plugin that adds the ability to render React Components

Package Exports

  • docpad-plugin-react

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (docpad-plugin-react) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

React Plugin for DocPad

Build Status NPM version

This plugin pre-renders React components from js or jsx files during the site generation.

<%- @react('./files/components/App.jsx') %>

NOTE: path is relative to docpad's srcPath.

This should also work with webpack style loaders (as long as you define the loader at the point of requiring in your js). For example:

var svg = require('url?mimetype=image/svg+xml!./example.svg');

You will also need to have the loaders as dependencies in your sites package.json

Install

npm install docpad-plugin-react

License

Licensed under the incredibly permissive MIT License
Copyright © 2014 Chris Hale