Skip to content

Commit

Permalink
build: fix cosmos env vars (Uniswap#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
zzmp authored Jun 7, 2022
1 parent b3ff25e commit 9e2fb39
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const isDevelopment =
process.env.NODE_ENV === 'test' || // jest
process.env.NODE_ENV === 'development' // cosmos
process.env.NODE_ENV === 'cosmos' // cosmos

module.exports = {
compact: false,
Expand Down
2 changes: 1 addition & 1 deletion cosmos.config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"watchDirs": ["src/cosmos"],
"webpack": {
"overridePath": "webpack.override.js"
"overridePath": "webpack.cosmos.js"
},
"port": 3000
}
1 change: 1 addition & 0 deletions webpack.override.js → webpack.cosmos.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const rollup = require('rollup')
const { config: rollupConfig, assets: assetConfigs } = require('./rollup.config.js')
const path = require('path')

process.env.NODE_ENV = 'cosmos'
require('dotenv').config()

class RollupPlugin extends EventEmitter {
Expand Down

0 comments on commit 9e2fb39

Please sign in to comment.