Skip to content
This repository has been archived by the owner on Aug 14, 2021. It is now read-only.

Fix build #8

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/request.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const ALLOWED_TIMEOUT = 1000;
const domain = process.env.NODE_ENV === 'production' ? 'https://devfit.now.sh/api' : 'http://localhost:8080/api';
const domain = process.env.NODE_ENV === 'production' ? 'https://devfit.now.sh/api' : 'http://localhost:3000/api';
const accessControlAllowOrigin = process.env.NODE_ENV === 'production' ? 'https://devfit.now.sh' : 'http://localhost:8080';

export const poster = (route: string, body: any) =>
Expand Down
45 changes: 22 additions & 23 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,29 @@ const path = require('path');
const withCss = require('@zeit/next-css');

module.exports = {
target: 'serverless',
...withCss({
webpack(config) {
// CSS
config.module.rules.push({
test: /\.(png|svg|eot|otf|ttf|woff|woff2)$/,
use: {
loader: 'url-loader',
options: {
limit: 100000,
publicPath: './',
outputPath: 'static/',
name: '[name].[ext]',
},
},
});
...withCss({
webpack(config) {
// CSS
config.module.rules.push({
test: /\.(png|svg|eot|otf|ttf|woff|woff2)$/,
use: {
loader: 'url-loader',
options: {
limit: 100000,
publicPath: './',
outputPath: 'static/',
name: '[name].[ext]',
},
},
});

// Modules alias
config.resolve.alias['components'] = path.join(__dirname, 'components');
// Modules alias
config.resolve.alias['components'] = path.join(__dirname, 'components');

return config;
return config;
},
}),
env: {
CLIENT_URL: process.env.CLIENT_URL,
},
}),
env: {
CLIENT_URL: process.env.CLIENT_URL,
},
};