UNPKG

telefunc

Version:

Remote functions. Instead of API.

17 lines (16 loc) 595 B
export default telefuncPlugin; import { install } from '../webpack/install.js'; import pc from '@brillout/picocolors'; // We don't use the type `NextConfig` to avoid version mismatches function telefuncPlugin(nextConfig) { return Object.assign({}, nextConfig, { webpack: (config, options) => { install(config, `${pc.green(pc.bold(' ✓'))}`); const nextConfig_ = nextConfig; if (typeof nextConfig_.webpack === 'function') { return nextConfig_.webpack(config, options); } return config; }, }); }