mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
fixed ramda imports to reduce bundle size
This commit is contained in:
parent
a497912049
commit
097b091abd
47 changed files with 208 additions and 91 deletions
|
@ -1,17 +1,22 @@
|
|||
/** used to transpile UMD and CJS modules */
|
||||
const withBundleAnalyzer = require('@next/bundle-analyzer')({
|
||||
enabled: process.env.ANALYZE === 'true',
|
||||
});
|
||||
const withTM = require('next-transpile-modules')(['ramda']);
|
||||
|
||||
module.exports = withTM({
|
||||
/** rewrite old-style node paths */
|
||||
async rewrites() {
|
||||
return [
|
||||
{
|
||||
source: '/post:id',
|
||||
destination: '/node/:id',
|
||||
},
|
||||
];
|
||||
},
|
||||
module.exports = withBundleAnalyzer(
|
||||
withTM({
|
||||
/** rewrite old-style node paths */
|
||||
async rewrites() {
|
||||
return [
|
||||
{
|
||||
source: '/post:id',
|
||||
destination: '/node/:id',
|
||||
},
|
||||
];
|
||||
},
|
||||
|
||||
/** don't try to optimize fonts */
|
||||
optimizeFonts: false,
|
||||
});
|
||||
/** don't try to optimize fonts */
|
||||
optimizeFonts: false,
|
||||
})
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue