react-multi-carousel-jsm
Version:
Production-ready, lightweight fully customizable React carousel component that rocks supports multiple items and SSR(Server-side rendering) with typescript.
34 lines (30 loc) • 833 B
JavaScript
const withTypescript = require("@zeit/next-typescript");
const withPlugins = require("next-compose-plugins");
const withFonts = require("next-fonts");
const withCSS = require("@zeit/next-css");
const withTM = require("next-transpile-modules");
const plugins = [
withTM({
transpileModules: ["src"]
}),
withFonts,
withCSS,
withTypescript
];
const commonConfig = {
poweredByHeader: false,
useFileSystemPublicRoutes: false,
distDir: ".next",
webpack: (config, options) => {
if (options.isServer && options.dev) {
const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin");
config.plugins.push(
new ForkTsCheckerWebpackPlugin({
tsconfig: "./tsconfig.json"
})
);
}
return config;
}
};
module.exports = withPlugins(plugins, commonConfig);