Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

referrring to process.env seems to include all my env variables into bundle #570

Closed
Gozala opened this issue Jun 2, 2020 · 1 comment · Fixed by #737
Closed

referrring to process.env seems to include all my env variables into bundle #570

Gozala opened this issue Jun 2, 2020 · 1 comment · Fixed by #737

Comments

@Gozala
Copy link
Contributor

Gozala commented Jun 2, 2020

Describe the bug
Here is the utility function I'm using in my tests:

/* eslint-env browser */

'use strict'

const IPFSClient = require('../../src/index')

const activate = () => {
  const worker = new SharedWorker(process.env.IPFS_WORKER_URL)
  const client = IPFSClient.from(worker.port)
  return client
}
exports.activate = activate

which is referred from my test file. While trying to debug my failing test aegir test -w -t browser -- --browsers Chrome I've discover following:

image

It actually contains all my env dump inlined in there.

.aegir.js
'use strict'

module.exports = {
bundlesize: { maxSize: '89kB' },
karma: {
files: [
{
pattern: 'node_modules/interface-ipfs-core/test/fixtures/**/*',
watched: false,
served: true,
included: false
},
{
pattern: 'dist/worker.bundle.js',
watched: false,
served: true,
included: false
}
],
browserNoActivityTimeout: 210 * 1000,
singleRun: true,
captureConsole: true,
logLevel: 'LOG_DEBUG',
mocha: {
bail: true
}
},
hooks: {
browser: {
pre: async () => {
return {
env: {
IPFS_WORKER_URL: /dist/worker.bundle.js
}
}
}
}
}
}

@hugomrdias
Copy link
Member

what happens when you console.log(process.env.IPFS_WORKER_URL)

@hugomrdias hugomrdias mentioned this issue Feb 23, 2021
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants