Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including less-import with all npm packages installed. Try it out:

var lessImport = require("less-import")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

less-import v0.0.2

Browserify plugin to import less files from javascript source


Browserify plugin to import less files from javascript source


npm install less-import --save-dev


To use less-import, you only need to activate the pluggin, passing a destination directory, and the gulp instance.

var lessImport = require('less-import');
var gulp = require('gulp');
var browserify = require('browserify');

var bundler = browserify('./src/javascript/app.js')
  // Activating less-import plugin
    dest: 'path/to/directory',
    gulp: gulp

// Building JS source


In your code, you can import .less files as normal, they will be parsed and saved in the directory specified.


// .. require JavaScript source



// .. import additional less files
@import 'sub-component.less'

.my-component {
  /* ... */


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free