-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
39 lines (35 loc) · 1.13 KB
/
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
const withSass = require('@zeit/next-sass');
const withImages = require('next-images');
const withCSS = require('@zeit/next-css');
const compose = require('next-compose-plugins');
const nextEnv = require('next-env');
const dotenvLoad = require('dotenv-load');
const getPathsObject = require('./scripts/getPathsObject');
dotenvLoad();
const withNextEnv = nextEnv();
const nextConfig = {
webpack: (config, { webpack }) => {
config.module.rules.push({
test: /\.js$/,
exclude: /node_modules(?!\/quill-image-drop-module|quill-image-resize-module|quill-image-rotate-module)/,
loader: 'babel-loader'
});
config.plugins.push(
new webpack.ProvidePlugin({
'window.Quill': 'quill'
})
);
return config;
},
exportPathMap: () => {
const fileObj = getPathsObject();
return {
...fileObj,
'/': { page: '/' },
'/index': { page: '/' },
'/news/index': { page: '/news' }
};
},
images: { domains: ['localhost', 'firebasestorage.googleapis.com', 'https://school23.vercel.app'] }
};
module.exports = compose([[withImages], [withSass], [withCSS], [withNextEnv]], nextConfig);