Skip to content
This repository has been archived by the owner on Nov 13, 2017. It is now read-only.

3100/sjsp-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

node-sjsp loader for webpack

This package allows injecting some codes for profiling your JavaScript files using node-sjsp and webpack.

Install

npm install sjsp-loader --save-dev

Usage

using loaders

Within your webpack configuration object, you'll need to add the sjsp-loader to the list of modules, like so:

var path = require('path');
module.exports = {
	entry: {
		'app': './app.js'
	},
	output: {
		filename: '[name].bundle.js'
	},
	module: {
		loaders: [
			{
				test: /(\.js)$/,
				loader: 'sjsp?interval=10',
				exclude: [
					path.resolve(__dirname, 'node_modules')
				]
			}
		]
	}
};
  • You can exclude vendor modules by adding the directory paths of them as profiling targets.

Options

See the node-sjsp usage.

interval

Interval time of logging the result in seconds (default 10)

License

MIT (http://www.opensource.org/licenses/mit-license.php)

About

node-sjsp module loader for webpack

Resources

Stars

Watchers

Forks

Packages

No packages published