In my next.config.js
I have the following configuration:
JavaScript
x
17
17
1
const withCSS = require('@zeit/next-css');
2
const withSass = require('@zeit/next-sass');
3
const withImages = require('next-images');
4
const withFonts = require('next-fonts');
5
6
module.exports = withCSS(
7
withSass(
8
withFonts(), // <=== this is wrong?
9
withImages({
10
distDir: '../_next',
11
webpack(config) {
12
return config;
13
}
14
})
15
)
16
);
17
Last thing which I need to add here is next-fonts plugin.
I am not sure how to export withFounts
in the right way.
I need next-fonts plugin to be able to use 'fonts' icons
.
Advertisement
Answer
You can do this:
JavaScript
1
9
1
module.exports = withCSS(withFonts(withSass(
2
withImages({
3
distDir: '../_next',
4
webpack(config) {
5
return config;
6
}
7
})
8
)))
9
You can try to use next-compose