diff --git a/_includes/getting-started-template.html b/_includes/getting-started-template.html index aec7494b6..dab99db1c 100644 --- a/_includes/getting-started-template.html +++ b/_includes/getting-started-template.html @@ -61,6 +61,40 @@

+

CommonJS Support

+ +

If you use a CommonJS build system (such as Webpack or Browserify), we recommend only loading the controls you need. You can also load all the controls by including the npm package.

+ +

Working with Browserify

+ +

This should work out of the box with Browserify.

+ +

Working with webpack

+ +
    +
  1. Install imports-loader for webpack +{% highlight js %} +npm install --save-dev imports-loader +{% endhighlight %} +
  2. +
  3. Add rule to webpack configuration +{% highlight js %} +{ + test: /fuelux\/js\/.*\.js$/, + use: ['imports-loader?define=>false'] +} +{% endhighlight %} +
  4. +
  5. Include individual modules or fuelux lib where needed +{% highlight js %} +// include where you need to +require('fuelux/js/checkbox') +// or +require('fuelux') +{% endhighlight %} +
  6. +
+