-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
47 lines (39 loc) · 6.32 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
40
41
42
43
44
45
46
47
"use strict";
var _nextTranspileModules = _interopRequireDefault(require("next-transpile-modules"));
var _bundleAnalyzer = _interopRequireDefault(require("@next/bundle-analyzer"));
var _path = require("path");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
require('./src/dev-utils').populateEnv();
const paths = {
universe: `${__dirname}/src/`,
multiverse: `${__dirname}/lib/`,
components: `${__dirname}/src/components/`,
rbc: `${__dirname}/node_modules/react-bulma-components/src/components`
};
const withTM = (0, _nextTranspileModules.default)(['react-bulma-components']);
module.exports = () => {
return (0, _bundleAnalyzer.default)({
enabled: process.env.ANALYZE === 'true'
})(withTM({
distDir: 'build',
sassOptions: {
includePaths: [(0, _path.join)(__dirname, '/src')]
},
webpack: config => {
config.resolve && (config.resolve.alias = { ...config.resolve.alias,
universe: paths.universe,
multiverse: paths.multiverse,
components: paths.components,
rbc: paths.rbc
});
return config;
},
env: {},
experimental: {
async rewrites() {
return [];
}
}
}));
};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbmZpZy9uZXh0LmNvbmZpZy50cyJdLCJuYW1lcyI6WyJyZXF1aXJlIiwicG9wdWxhdGVFbnYiLCJwYXRocyIsInVuaXZlcnNlIiwiX19kaXJuYW1lIiwibXVsdGl2ZXJzZSIsImNvbXBvbmVudHMiLCJyYmMiLCJ3aXRoVE0iLCJtb2R1bGUiLCJleHBvcnRzIiwiZW5hYmxlZCIsInByb2Nlc3MiLCJlbnYiLCJBTkFMWVpFIiwiZGlzdERpciIsInNhc3NPcHRpb25zIiwiaW5jbHVkZVBhdGhzIiwid2VicGFjayIsImNvbmZpZyIsInJlc29sdm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gIC8vID8gVGhlc2UgYXJlIGFsaWFzZXMgdGhhdCBjYW4gYmUgdXNlZCBkdXJpbmcgSlMgaW1wb3J0IGNhbGxzXG4gICAgICAgICAgICAvLyAhIE5vdGUgdGhhdCB5b3UgbXVzdCBhbHNvIGNoYW5nZSB0aGVzZSBzYW1lIGFsaWFzZXMgaW4gdHNjb25maWcuanNvblxuICAgICAgICAgICAgLy8gISBOb3RlIHRoYXQgeW91IG11c3QgYWxzbyBjaGFuZ2UgdGhlc2Ugc2FtZSBhbGlhc2VzIGluIHBhY2thZ2UuanNvbiAoamVzdClcbiAgICAgICAgICAgIGNvbmZpZy5yZXNvbHZlICYmIChjb25maWcucmVzb2x2ZS5hbGlhcyA9IHtcbiAgICAgICAgICAgICAgICAuLi5jb25maWcucmVzb2x2ZS5hbGlhcyxcbiAgICAgICAgICAgICAgICB1bml2ZXJzZTogcGF0aHMudW5pdmVyc2UsXG4gICAgICAgICAgICAgICAgbXVsdGl2ZXJzZTogcGF0aHMubXVsdGl2ZXJzZSxcbiAgICAgICAgICAgICAgICAvLyB0eXBlcy8gaXMgcHVycG9zZWx5IGV4Y2x1ZGVkXG4gICAgICAgICAgICAgICAgY29tcG9uZW50czogcGF0aHMuY29tcG9uZW50cyxcbiAgICAgICAgICAgICAgICByYmM6IHBhdGhzLnJiYyxcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICByZXR1cm4gY29uZmlnO1xuICAgICAgICB9LFxuXG4gICAgICAgIC8vID8gU2VsZWN0IHNvbWUgZW52aXJvbm1lbnQgdmFyaWFibGVzIGRlZmluZWQgaW4gLmVudiB0byBwdXNoIHRvIHRoZVxuICAgICAgICAvLyA/IGNsaWVudC5cbiAgICAgICAgLy8gISEgRE8gTk9UIFBVVCBBTlkgU0VDUkVUIEVOVklST05NRU5UIFZBUklBQkxFUyBIRVJFICEhXG4gICAgICAgIGVudjoge30sXG5cbiAgICAgICAgLy8gVE9ETzogbW92ZSB0aGVzZSBvdXQgb2YgZXhwZXJpbWVudGFsIHdoZW4gdGhleSdyZSBub3QgZXhwZXJpbWVudGFsXG4gICAgICAgIC8vIFRPRE86IGFueW1vcmUhXG4gICAgICAgIGV4cGVyaW1lbnRhbDoge1xuICAgICAgICAgICAgYXN5bmMgcmV3cml0ZXMoKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIFtcbiAgICAgICAgICAgICAgICAgICAgLy8ge1xuICAgICAgICAgICAgICAgICAgICAvLyAgICAgc291cmNlOiAnL3gnLFxuICAgICAgICAgICAgICAgICAgICAvLyAgICAgZGVzdGluYXRpb246ICcveSdcbiAgICAgICAgICAgICAgICAgICAgLy8gfVxuICAgICAgICAgICAgICAgIF07XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9KSk7XG59O1xuIl19