1.0.1 • Published 7 years ago

bsb-plugin v1.0.1

Weekly downloads
1
License
ISC
Repository
-
Last release
7 years ago

BSB Plugin

Hassle free reasonmling with webpack

Getting Started

  1. Install bsb-plugin and bs-platform as dev dependencies
  npm i -s -D bsb-plugin bs-platform
  1. Add it to your webpack.config
  const path = require('path')
  const bsbPlugin = require('bsb-plugin')

  module.exports = {
    entry: './src/index.js',
    output: {
      filename: 'index.js',
      path: path.resolve(__dirname, 'build')
    },
    plugins: [
      new bsbPlugin({options: true})
    ]
  }
  1. Freely import .re files within your javascript files, it will be compiled to javascript

test.re

  let greet = name => "Hello " ++ name;

index.js

  import { greet } from './test'

  console.log(greet('Test'))