UNPKG
fis3-hook-npm
Version:
latest (1.2.1)
1.2.1
1.2.0
1.0.1
1.0.0
0.0.2
0.0.1
Npm package integraion for fis3
github.com/qqiangwu/fis3-hook-npm
qqiangwu/fis3-hook-npm
fis3-hook-npm
/
browserify.js
11 lines
(8 loc)
•
310 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
// replace node specific variables
module
.
exports
=
function
(
info, opts
) {
if
(info.
file
.
isJsLike
) {
var
content = info.
content
;
var
isProd = info.
file
.
optimizer
; info.
content
= content.
replace
(
/process.env.NODE_ENV/g
, isProd?
'"production"'
:
'"development"'
); } };