# Environment Variables in Hooks? (App-Scripts)

**URL:** <https://forum.ionicframework.com/t/environment-variables-in-hooks-app-scripts/81946>\
**Category:** ionic-v1\
**Created:** [March 6, 2017, 9:55am UTC](https://forum.ionicframework.com/t/environment-variables-in-hooks-app-scripts/81946 "2017-03-06T09:55:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![matthiashochrieser](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/matthiashochrieser/32/107434_2.png) [@matthiashochrieser](https://forum.ionicframework.com/u/matthiashochrieser)\
**Post date:** [March 6, 2017, 9:55am UTC](https://forum.ionicframework.com/t/environment-variables-in-hooks-app-scripts/81946/1 "2017-03-06T09:55:45Z")

</div>

Is it possible to use the environment variables from app-scripts in Hooks?

I tried the following. I added those lines to the package.json:

“config” : {  
“ionic\_src\_dir”: “./hello”  
}

And made a Hook which is doing this:

module.exports = function(){  
console.log(process.env);  
}

But it doesn’t show me the ionic source directory as env variable. Is this even possible? When i build the directory is accepted as build because it shows me an immediate error that there are files missing the the hello directory.
