Created
February 15, 2019 14:11
-
-
Save pkellner/842f952dfc917774054d209999b46a9c to your computer and use it in GitHub Desktop.
Revisions
-
pkellner created this gist
Feb 15, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,47 @@ const withCSS = require('@zeit/next-css'); require('dotenv').config(); const path = require('path'); const Dotenv = require('dotenv-webpack'); const withImages = require('next-images'); const withTypescript = require('@zeit/next-typescript'); const withOffline = require('next-offline'); //const isProd = process.env.NODE_ENV === 'production'; /* Without CSS Modules, with PostCSS */ module.exports = withTypescript( withCSS( withImages( withOffline({ //assetPrefix: isProd ? 'http://d30k733rzexkhf.cloudfront.net' : '', inlineImageLimit: 16384, serverRuntimeConfig: { // Will only be available on the server side }, publicRuntimeConfig: { BASEURL_DEFAULT: 'https://www.siliconvalley-codecamp.com', RESTURL_SPEAKERS_DEFAULT: 'https://www.siliconvalley-codecamp.com/rest/speakers/ps', RESTURL_SPEAKER_DEFAULT: 'https://www.siliconvalley-codecamp.com/rest/speaker', RESTURL_SESSIONS_DEFAULT: 'https://www.siliconvalley-codecamp.com/rest/sessions', RESTURL_ISLOGGEDIN_DEFAULT: 'https://www.siliconvalley-codecamp.com/rpc/account/isLoggedInMobileApp', LOGINAUTH_URL_DEFAULT: 'https://www.siliconvalley-codecamp.com/rpc/account/Login', LOGOUT_URL_DEFAULT: 'https://www.siliconvalley-codecamp.com/rpc/account/LogOutMobileApp', ISLOGGEDIN_NO_DEFAULT: 'https://www.siliconvalley-codecamp.com/rpc/Account/IsLoggedIn', PUBLIC_URL: '' }, webpack(config, options) { config.plugins = config.plugins || []; config.plugins = [ ...config.plugins, // Read the .env file new Dotenv({ path: path.join(__dirname, '.env'), systemvars: true }) ]; return config; } }) ) ) );