@chickendinosaur/inferno-asynx-component

2.0.0 • Public • Published

Inferno component for webpack code splitting.


Getting Started

Installation

npm

npm install --save inferno-async-component

For webpack 'import -> System.import' transforms:

  • npm install --save-dev babel-plugin-syntax-dynamic-import

Usage

const InfernoAsyncComponent = require('inferno-async-component');

// Filename relative from where InfernoAsyncComponent is being used.
const componentFilename = './about';

...

<InfernoAsyncComponent
	module={import(componentFilename)}
	placeholder={<div>Loading...</div>}
	title:'Async About'
>
	Child element.
</InfernoAsyncComponent>

...

Development

Installation

~/project/:

  • npm install

Build

  • npm run build

Benchmarking

  • npm run benchmark

Test

  • npm run test

Publish

  • npm run deploy

License

The MIT License (MIT)

Copyright (c) 2016 John Pittman

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Readme

Keywords

Package Sidebar

Install

npm i @chickendinosaur/inferno-asynx-component

Weekly Downloads

3

Version

2.0.0

License

MIT

Last publish

Collaborators

  • chickendinosaur