Skip to content

mistadikay/strict-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

strict-loader

npm version

Adds use strict; in the beginning of each source

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

Please note that if you use Babel, the strict transformer automatically places a "use strict"; directive at the top of your files. In this case you don't need strict-loader.

Install

$ npm install --save strict-loader

Usage

inline

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

webpack config

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

License

MIT