Closed dedan closed 8 years ago
Hi @dedan,
we are using webpack to include the configuration (it is set as an alias in the webpack configuration). This means you will need to use webpack to use it correctly. However, you could also include it like a regular es2015 import:
// webpack, available from anywhere:
import config from 'config';
// without webpack:
import config from '../full/path/to/src/config/DEV-OR-LIVE';
Does this help?
Thank you for this explanation. In the end I solved it by switching to the Karma test runner.
I have one reducer function in which I import the environment specific
config
object viaimport {config} from 'config'
. This works without problems when using thedev
ordist
environment, for example in the webpack-dev-server that I start withnpm start
. But I run into a problem when I import this reducer function in a test.How do people usually handle things that depend on the webpack build specifics?