Skip to content

Commit d51286a

Browse files
committedJul 4, 2022
prepend app env vars with NEXT_PUBLIC_
1 parent c95b84e commit d51286a

File tree

99 files changed

+179
-321
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+179
-321
lines changed
 

‎book/1-end/app/next.config.js

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
// eslint-disable-next-line
2-
require('dotenv').config();
3-
41
module.exports = {
5-
env: {
6-
URL_APP: process.env.URL_APP,
7-
URL_API: process.env.URL_API,
8-
PORT_APP: process.env.PORT_APP,
9-
},
2+
poweredByHeader: false,
3+
webpack5: true,
104
};

‎book/1-end/app/pages/_document.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React from 'react';
33

44
class MyDocument extends Document {
55
public render() {
6-
console.log(process.env.URL_APP);
6+
console.log(process.env.NEXT_PUBLIC_URL_APP);
77
return (
88
<Html lang="en">
99
<Head>

0 commit comments

Comments
 (0)