forked from buzzycloud/buzzyblog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
40 lines (34 loc) · 934 Bytes
/
next.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
const compose = require("lodash/fp/compose");
const withSass = require("@zeit/next-sass");
const withCss = require("@zeit/next-css");
const buzzy = require("./buzzy.config");
const withSourceMaps = require("@zeit/next-source-maps")();
const axios = require("axios");
const enhance = compose(
withSourceMaps,
withCss,
withSass
);
const fileLoaderRule = {
test: /\.(jpe?g|png|gif|svg|ico|ttf|eot|woff|woff2|otf|webp)$/,
use: [
{
loader: "url-loader",
},
],
};
module.exports = enhance({
// cssModules: true,
target: "server",
compress: true,
distDir: "dist",
env: {
...buzzy.env,
},
poweredByHeader: false,
webpack: (config, options) => {
config.module.rules.push(fileLoaderRule);
return config;
},
});
//http://bit.ly/nextjs-css-loader-bug this bug is fixed in v9.1.2-canary.1