@navita/next-plugin 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +4 -1
- package/index.d.ts +2 -1
- package/package.json +2 -2
package/index.cjs
CHANGED
|
@@ -106,6 +106,9 @@ const createNavitaStylePlugin = (navitaConfig = {})=>(nextConfig)=>Object.assign
|
|
|
106
106
|
// This will happen if the user doesn't have write access to the cache directory.
|
|
107
107
|
// But the same should happen with the webpack cache.
|
|
108
108
|
}
|
|
109
|
+
// If the user has provided their own onRenderInitialized function,
|
|
110
|
+
// we'll do it after the cache is loaded.
|
|
111
|
+
return navitaConfig.onRenderInitialized?.(renderer);
|
|
109
112
|
};
|
|
110
113
|
config.plugins?.push({
|
|
111
114
|
apply (compiler) {
|
|
@@ -124,9 +127,9 @@ const createNavitaStylePlugin = (navitaConfig = {})=>(nextConfig)=>Object.assign
|
|
|
124
127
|
});
|
|
125
128
|
config.plugins?.push(new webpackPlugin.NavitaPlugin({
|
|
126
129
|
useWebpackCache: false,
|
|
127
|
-
onRenderInitialized,
|
|
128
130
|
outputCss,
|
|
129
131
|
...navitaConfig,
|
|
132
|
+
onRenderInitialized,
|
|
130
133
|
optimizeCSSOutput: optimizeCSSOutput.optimizeCSSOutput
|
|
131
134
|
}));
|
|
132
135
|
if (typeof nextConfig.webpack === "function") {
|
package/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Options } from '@navita/webpack-plugin';
|
|
2
|
+
export { Renderer } from '@navita/webpack-plugin';
|
|
2
3
|
import { NextConfig } from 'next';
|
|
3
4
|
|
|
4
|
-
interface Config extends Omit<Options, 'useWebpackCache'
|
|
5
|
+
interface Config extends Omit<Options, 'useWebpackCache'> {
|
|
5
6
|
singleCssFile?: boolean;
|
|
6
7
|
}
|
|
7
8
|
declare const createNavitaStylePlugin: (navitaConfig?: Config) => (nextConfig: NextConfig) => NextConfig;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@navita/next-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Next.js integration for Navita",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"next",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"browserslist": "^4.21.5",
|
|
28
|
-
"@navita/webpack-plugin": "0.
|
|
28
|
+
"@navita/webpack-plugin": "0.4.0"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"next": ">=12 || >=13",
|