New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

webpack-service

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-service

Webpack service

latest
Source
npmnpm
Version
0.1.2
Version published
Weekly downloads
1
-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

DEPRECATED in favour of webpack-build

webpack-service

Build Status

A high-level wrapper around webpack which:

  • Reuses compiler instances to reduce the overhead on multiple requests.
  • Provides optional file watchers to detect changes to both your config and source files
  • Provides optional caches of the compilation output
  • Pre-processes the compilation output so that it can be easily stored or serialized without having to handle the entire source tree
  • Provides a config helper to pre-process your config and map the output path to a particular directory

Installation

npm install webpack webpack-service

Usage

var webpackService = require('webpack-service');

webpackService({
  // An absolute path to a webpack config file.
  config: '/path/to/webpack.config.js',
  //
  // ---------------------
  // Default configuration
  // ---------------------
  //
  // Should webpack watch the source files for changes and rebuild in the
  // background
  watch: false,
  // The delay between a change being detected and webpack starting the
  // rebuild process
  watchDelay: 200,
  // Indicates that the config file should be watched for changes. Any changes
  // will cause webpack to start rebuilding the bundle
  watchConfig: false,
  // Indicates that the compiled output should be cached. Ignored if the bundle
  // is being watched
  cache: false,
  // Indicates that full output of webpack's compilation data should be returned
  fullStats: false,
  // If defined, a config's `output.path` prop will have "[bundle_dir]" substrings
  // replaced with the value of `bundleDir`
  bundleDir: null
}), function(err, stats) {
  // Besides the usual stats data produced by webpack, the service adds extra props:
  // stats.webpackConfig: the object passed in to webpack
  // stats.pathsToAssets: an object mapping asset names to the full path of the emitted asset
});

FAQs

Package last updated on 23 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts