diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2022-03-18 17:24:16 +0100 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2022-04-05 13:46:33 +0200 |
| commit | 8af9c6576d9d2a9d2d4ff9e863a310000b881848 (patch) | |
| tree | 13dee5ae196e5cc3d90e46c8d25b12e2b1bd0a70 /opendc-web/opendc-web-ui/next.config.js | |
| parent | 831dafd4513084c758d3b70587a9b7fecce2c100 (diff) | |
build(web/ui): Migrate to next-global-css
This change updates the web interface to use next-global-css instead of
next-transpile-modules. This approach is more efficient since it does
not require transpilation of the dependencies.
Diffstat (limited to 'opendc-web/opendc-web-ui/next.config.js')
| -rw-r--r-- | opendc-web/opendc-web-ui/next.config.js | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/opendc-web/opendc-web-ui/next.config.js b/opendc-web/opendc-web-ui/next.config.js index 1dfe4156..ceb0900e 100644 --- a/opendc-web/opendc-web-ui/next.config.js +++ b/opendc-web/opendc-web-ui/next.config.js @@ -22,39 +22,21 @@ // PatternFly 4 uses global CSS imports in its distribution files. Therefore, // we need to transpile the modules before we can use them. -const withTM = require('next-transpile-modules')([ - '@patternfly/react-core', - '@patternfly/react-styles', - '@patternfly/react-table', - '@patternfly/react-tokens', -]) +const { withGlobalCss } = require('next-global-css') +const withConfig = withGlobalCss() -module.exports = withTM({ +module.exports = withConfig({ reactStrictMode: true, experimental: { - eslint: true, + eslint: true }, async redirects() { return [ { source: '/', destination: '/projects', - permanent: true, - }, - ] - }, - webpack: (config, options) => { - if (options.dev) { - config.optimization.splitChunks = { - cacheGroups: { - vendor: { - test: /[\\/]node_modules[\\/]/, - name: 'transpiled-modules', - chunks: 'all', - }, - }, + permanent: true } - } - return config + ] } }) |
