Name: react-twist-webpack-plugin
Owner: Adobe Systems Incorporated
Description: Webpack plugin for React-Twist
Created: 2017-12-22 02:06:19.0
Updated: 2018-01-22 18:51:47.0
Pushed: 2018-02-05 19:09:29.0
Homepage: null
Size: 194
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This library contains a Webpack plugin for building an application with React-Twist.
If you want to use both the state-management and component layers of Twist, you'll need to install the following (via NPM or Yarn):
@twist/core
- This includes support for stores, data binding, and application state management.@twist/react
- The React implementation of Twist components.@twist/react-webpack-plugin
- A webpack plugin that compiles Twist files (Twist has its own Babel transform that runs before React's).If you're not using webpack, you can also get hold of the Babel configuration directly, using @twist/configuration
(this is done automatically by the webpack plugin).
After that, the only thing you need is a .twistrc
file in the root of your project, that tells Twist which libraries to include (this is also used by the Twist ESlint plugin). There are a number of advanced options, but to get up and running, you just need to tell Twist that you're using React-Twist:
"libraries": [
"@twist/react"
]
In your webpack.conf.js
you can now include the React Twist plugin - by default this will compile all files that end in .jsx
with Twist and React:
t ReactTwistPlugin = require('@twist/react-webpack-plugin');
le.exports = {
...
plugins: [
new ReactTwistPlugin(),
...
],
...