1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
next.js/examples/with-universal-configuration-build-time/.babelrc.js
Rafael Mariano 75efa817c0 Modify with-universal-configuration example (#4498) (#5948)
Explains in details how the "with-universal-configuration" example works and rename it to "with-universal-configuration-build-time". Changing the example name makes the purpose of the example clear.

The "env-config.js" file introduce one more sample of variable usage that instantiates an immediate value of the local environment variable. This makes it even clearer how build-time variable configuration works. The "index.js" page makes explicit the use of these configured environment variables.

The universal configuration confusion happens when the value of the environment variable is used directly in the application causing an effect in server-side but not on the client side.
2018-12-26 20:19:31 +01:00

7 lines
127 B
JavaScript

const env = require('./env-config.js')
module.exports = {
presets: ['next/babel'],
plugins: [['transform-define', env]]
}