// eslint-disable-next-line @typescript-eslint/no-var-requires
const withNx = require('@nrwl/next/plugins/with-nx');

<% if (style === 'less') { %>
const withLess = require('@zeit/next-less');
module.exports = withLess(withNx({
  // Set this to true if you use CSS modules.
  // See: https://github.com/css-modules/css-modules
  cssModules: false
}));
<% } else if (style === 'styl') { %>
const withStylus = require('@zeit/next-stylus');
module.exports = withStylus(withNx({
  // Set this to true if you use CSS modules.
  // See: https://github.com/css-modules/css-modules
  cssModules: false
}));
<% } else if (
  style === 'styled-components'
  ||style === '@emotion/styled'
  || style === 'styled-jsx'
  || style === 'none'
) { %>
module.exports = withNx({});
<% } else {
// Defaults to CSS/SASS (which don't need plugin as of Next 9.3) %>
module.exports = withNx({});
<% } %>
