| @@ -5,12 +5,11 @@ import { | |||||
| useQuery, | useQuery, | ||||
| createHttpLink, | createHttpLink, | ||||
| } from "@apollo/client"; | } from "@apollo/client"; | ||||
| import { createUploadLink } from "apollo-upload-client"; | |||||
| import ApolloConfig from "../config/apollo-config"; | import ApolloConfig from "../config/apollo-config"; | ||||
| import fetch from "cross-fetch"; | import fetch from "cross-fetch"; | ||||
| function initApollo(token) { | function initApollo(token) { | ||||
| const httpLink = createUploadLink({ | |||||
| const httpLink = createHttpLink({ | |||||
| uri: ApolloConfig.graphql_uri, | uri: ApolloConfig.graphql_uri, | ||||
| fetch: fetch, | fetch: fetch, | ||||
| headers: | headers: | ||||
| @@ -5,8 +5,11 @@ const webpack = require("webpack"); | |||||
| const path = require("path"); | const path = require("path"); | ||||
| module.exports = withPlugins([[withSass], [withImages]], { | module.exports = withPlugins([[withSass], [withImages]], { | ||||
| webpack(config, options) { | |||||
| config.resolve.modules.push(path.resolve("./")); | |||||
| return config; | |||||
| } | |||||
| webpack(config, { dev }) { | |||||
| if (dev) { | |||||
| config.devtool = "cheap-module-source-map"; | |||||
| } | |||||
| config.resolve.modules.push(path.resolve("./")); | |||||
| return config; | |||||
| }, | |||||
| }); | }); | ||||
| @@ -33,12 +33,11 @@ | |||||
| }, | }, | ||||
| "homepage": "https://demos.creative-tim.com/nextjs-material-kit", | "homepage": "https://demos.creative-tim.com/nextjs-material-kit", | ||||
| "dependencies": { | "dependencies": { | ||||
| "@apollo/client": "^3.3.11", | |||||
| "@material-ui/core": "4.9.13", | "@material-ui/core": "4.9.13", | ||||
| "@material-ui/icons": "4.9.1", | "@material-ui/icons": "4.9.1", | ||||
| "@zeit/next-css": "^1.0.1", | "@zeit/next-css": "^1.0.1", | ||||
| "@zeit/next-sass": "1.0.1", | "@zeit/next-sass": "1.0.1", | ||||
| "apollo": "^2.32.1", | |||||
| "apollo-upload-client": "^14.1.3", | |||||
| "classnames": "2.2.6", | "classnames": "2.2.6", | ||||
| "cross-fetch": "^3.0.6", | "cross-fetch": "^3.0.6", | ||||
| "graphql": "^15.3.0", | "graphql": "^15.3.0", | ||||