/strict-loader

Adds use strict; in the beginning of each source

Primary LanguageJavaScript

strict-loader

npm version

Adds use strict; in the beginning of each source

Inspired by this gist https://gist.github.com/loganfsmyth/6f8520c7c96f61f0a5b8

Install

$ npm install --save strict-loader

Usage

inline

require('strict!./yourmom.js');

webpack config

module.exports = {
  module: {
    loaders: [
      {
        test: /\.js$/,
        loader: 'strict'
      }
    ]
  }
};

License

MIT