const configurator = require("@nteract/webpack-configurator");

module.exports = {
  webpack: configurator.nextWebpack
};

const configurator = require("@nteract/webpack-configurator");
const withTypescript = require("@zeit/next-typescript");

module.exports = withTypescript({ webpack: configurator.nextWebpack });

Update next config to support TypeScript