rsnext/examples/with-now-env/pages/index.js
JJ Kasper 17da3f86ad Update with-now-env to use env config (#6581)
* Update with-now-env to use `env` config
instead of webpack.DefinePlugin

* Remove mention of DefinePlugin from index page
2019-03-08 20:41:07 +01:00

21 lines
593 B
JavaScript

export default () => (
<div className='hello'>
<p>
Hello World! Here's a secret shared with the client using Next env: <strong>{process.env.SECRET}</strong>, the secret is shared
at compile time, which means every reference to the secret is replaced
with its value
</p>
<style jsx>{`
.hello {
font: 15px Helvetica, Arial, sans-serif;
background: #eee;
padding: 100px;
text-align: center;
transition: 100ms ease-in background;
}
.hello:hover {
background: #ccc;
}
`}</style>
</div>
)