rox-embedded-webpack-plugin

A webpack plugin which injects embedded rox configuration into your build

Usage no npm install needed!

<script type="module">
  import roxEmbeddedWebpackPlugin from 'https://cdn.skypack.dev/rox-embedded-webpack-plugin';
</script>

README

rox-embedded-webpack-plugin

A webpack plugin which injects embedded rox configuration into your build.

Peer Depedency Requirements

Installation

Install the plugin:

NPM Yarn
npm install --save-dev rox-embedded-webpack yarn install -D rox-embedded-webpack

Release

The release process is manual, there is no CI. To upload the new release to npm, you will need to be listed as a maintainer on the rox-embedded-webpack-plugin package. To become a maintainer, talk to one of the existing maintainers who will be able to invite you to the project.

To release the plugin:

  1. Create a new branch to make updates to package.json etc. e.g. git checkout -b create-1.2.3-release
  2. Make the new release by running yarn release. This will update the version number, add an entry to CHANGELOG.md and create a tag.
  3. Push the changes on your create-1.2.3-release branch to your fork or a branch on origin ready to create a Pull Request. e.g. git push my-fork create-1.2.3-release or git push origin create-1.2.3-release
  4. Push the newly created release tag to GitHub, e.g. git push origin v1.2.3 (or git push origin --tags if you're sure you haven't created any other tags!)
  5. Create a Pull Request and get it reviewed/merged back to master.
  6. Upload the new release to npm: npm publish

Usage

CommonJS
const ROXEmbeddedPlugin = require('rox-embedded-webpack-plugin');
module.exports = {
  entry: //...,
  output: //...,
  plugins: [
    new ROXEmbeddedPlugin(options)
  ]
}
ES6 / ES2015 Modules
import ROXEmbeddedPlugin = from 'rox-embedded-webpack-plugin';
export default {
  entry: //...,
  output: //...,
  plugins: [
    new ROXEmbeddedPlugin(options)
  ]
}

Options

It is an object with the following keys:

{
   app: <YOUR APP KEY>,
   platform: <YOUR_PLATFORM_OF_CHOICE>, // (you can use 'Browser' here)
   output: <ABS_TEMPORARY_OUTPUT_DIR> // (OPTIONAL)
}