Skip to content

Commit 1e1368b

Browse files
committed
Add error when used as a transform
1 parent f5899a7 commit 1e1368b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ var envify = require('envify/custom')
66
var uglifyify = require('uglifyify')
77

88
module.exports = function (b, opts) {
9+
if (typeof b !== 'object') {
10+
throw new Error('tinyify: must be used as a plugin, not a transform')
11+
}
12+
913
var env = Object.assign({
1014
NODE_ENV: 'production'
1115
}, process.env)

0 commit comments

Comments
 (0)