Skip to content

Commit

Permalink
feat(env): process.env.NODEPACK_ROOT which define the project root path
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau committed Aug 23, 2019
1 parent 85be3f7 commit 0208c32
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/@nodepack/service/src/config/base.js
Expand Up @@ -192,7 +192,10 @@ module.exports = (api, options) => {
.plugin('define')
// @ts-ignore
.use(require('webpack/lib/DefinePlugin'), [
resolveClientEnv(options),
{
...resolveClientEnv(options),
'process.env.NODEPACK_ROOT': JSON.stringify(api.getCwd()),
},
])

// Others
Expand Down

0 comments on commit 0208c32

Please sign in to comment.