const withPlugins = require("next-compose-plugins");
const withImages = require("next-images");
const withSass = require("@zeit/next-sass");
const webpack = require("webpack");
const path = require("path");
// const withCSS = require("@zeit/next-css");

// require("dotenv").config();

module.exports = withPlugins([[withSass], [withImages]], {
	// env: {
	// 	API_URL: process.env.API_URL,
	// },
	trailingSlash: true,
	webpack(config, { dev }) {
		if (dev) {
			config.devtool = "cheap-module-source-map";
		}
		config.resolve.modules.push(path.resolve("./"));
		return config;
	},
	generateEtags: false,
});
