@koine/next 2.0.0-beta.121 → 2.0.0-beta.123
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/config.cjs.js +8 -8
- package/config.esm.js +8 -8
- package/package.json +4 -4
package/config.cjs.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var swc = require('@koine/node/swc');
|
|
3
4
|
var next = require('@koine/i18n/next');
|
|
4
5
|
|
|
5
6
|
/**
|
|
@@ -10,18 +11,17 @@ var next = require('@koine/i18n/next');
|
|
|
10
11
|
* @param {object} options
|
|
11
12
|
* @property {boolean} [options.nx=false] Nx monorepo setup
|
|
12
13
|
* @property {boolean} [options.svg=false] SVG to react components
|
|
13
|
-
*/let withKoine=(
|
|
14
|
-
eslint:{ignoreDuringBuilds:!0},// we have this strict check on each commit
|
|
14
|
+
*/let withKoine=(i={})=>{let{nx:n,svg:s,i18nRoutes:p,i18nCompiler:l,...a}=i,m={eslint:{ignoreDuringBuilds:!0},// we have this strict check on each commit
|
|
15
15
|
typescript:{ignoreBuildErrors:!0},// we have this strict check on each commit
|
|
16
16
|
poweredByHeader:!1,experimental:{// @see https://github.com/vercel/vercel/discussions/5973#discussioncomment-472618
|
|
17
17
|
// @see critters error https://github.com/vercel/next.js/issues/20742
|
|
18
18
|
// optimizeCss: true,
|
|
19
19
|
// @see https://github.com/vercel/next.js/discussions/30174#discussion-3643870
|
|
20
|
-
scrollRestoration:!0,...a.experimental||{}}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
delete
|
|
24
|
-
{let o="function"==typeof
|
|
25
|
-
o.module.rules.push({test:/\.svg$/,use:[{loader:"@svgr/webpack",options:{svgoConfig:{plugins:[{name:"removeViewBox",active:!1}]}}}]}),o)})),
|
|
20
|
+
scrollRestoration:!0,...a.experimental||{}},// @see https://www.zhoulujun.net/nextjs/advanced-features/compiler.html#modularize-imports
|
|
21
|
+
modularizeImports:{...a.modularizeImports||{},...swc.swcTransformsKoine},...a};return (s&&(n?// @see https://github.com/gregberge/svgr
|
|
22
|
+
m.nx={svgr:!0}:(// if falsy just remove the key
|
|
23
|
+
delete m.nx,m.webpack=(e,r)=>// ...[_config, options]: Parameters<NonNullable<NextConfig['webpack']>>
|
|
24
|
+
{let o="function"==typeof m.webpack?m.webpack(e,r):e;return(// @see https://dev.to/dolearning/importing-svgs-to-next-js-nna#svgr
|
|
25
|
+
o.module.rules.push({test:/\.svg$/,use:[{loader:"@svgr/webpack",options:{svgoConfig:{plugins:[{name:"removeViewBox",active:!1}]}}}]}),o)})),p)?next.withI18nLegacy({...m,i18nRoutes:p}):l?n?next.withI18nAsync({...m,i18nCompiler:l}):next.withI18n({...m,i18nCompiler:l}):m};
|
|
26
26
|
|
|
27
27
|
exports.withKoine = withKoine;
|
package/config.esm.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { swcTransformsKoine } from '@koine/node/swc';
|
|
1
2
|
import { withI18nLegacy, withI18nAsync, withI18n } from '@koine/i18n/next';
|
|
2
3
|
|
|
3
4
|
/**
|
|
@@ -8,18 +9,17 @@ import { withI18nLegacy, withI18nAsync, withI18n } from '@koine/i18n/next';
|
|
|
8
9
|
* @param {object} options
|
|
9
10
|
* @property {boolean} [options.nx=false] Nx monorepo setup
|
|
10
11
|
* @property {boolean} [options.svg=false] SVG to react components
|
|
11
|
-
*/let withKoine=(
|
|
12
|
-
eslint:{ignoreDuringBuilds:!0},// we have this strict check on each commit
|
|
12
|
+
*/let withKoine=(i={})=>{let{nx:n,svg:s,i18nRoutes:p,i18nCompiler:l,...a}=i,m={eslint:{ignoreDuringBuilds:!0},// we have this strict check on each commit
|
|
13
13
|
typescript:{ignoreBuildErrors:!0},// we have this strict check on each commit
|
|
14
14
|
poweredByHeader:!1,experimental:{// @see https://github.com/vercel/vercel/discussions/5973#discussioncomment-472618
|
|
15
15
|
// @see critters error https://github.com/vercel/next.js/issues/20742
|
|
16
16
|
// optimizeCss: true,
|
|
17
17
|
// @see https://github.com/vercel/next.js/discussions/30174#discussion-3643870
|
|
18
|
-
scrollRestoration:!0,...a.experimental||{}}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
delete
|
|
22
|
-
{let o="function"==typeof
|
|
23
|
-
o.module.rules.push({test:/\.svg$/,use:[{loader:"@svgr/webpack",options:{svgoConfig:{plugins:[{name:"removeViewBox",active:!1}]}}}]}),o)})),
|
|
18
|
+
scrollRestoration:!0,...a.experimental||{}},// @see https://www.zhoulujun.net/nextjs/advanced-features/compiler.html#modularize-imports
|
|
19
|
+
modularizeImports:{...a.modularizeImports||{},...swcTransformsKoine},...a};return (s&&(n?// @see https://github.com/gregberge/svgr
|
|
20
|
+
m.nx={svgr:!0}:(// if falsy just remove the key
|
|
21
|
+
delete m.nx,m.webpack=(e,r)=>// ...[_config, options]: Parameters<NonNullable<NextConfig['webpack']>>
|
|
22
|
+
{let o="function"==typeof m.webpack?m.webpack(e,r):e;return(// @see https://dev.to/dolearning/importing-svgs-to-next-js-nna#svgr
|
|
23
|
+
o.module.rules.push({test:/\.svg$/,use:[{loader:"@svgr/webpack",options:{svgoConfig:{plugins:[{name:"removeViewBox",active:!1}]}}}]}),o)})),p)?withI18nLegacy({...m,i18nRoutes:p}):l?n?withI18nAsync({...m,i18nCompiler:l}):withI18n({...m,i18nCompiler:l}):m};
|
|
24
24
|
|
|
25
25
|
export { withKoine };
|
package/package.json
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"name": "@koine/next",
|
|
3
3
|
"sideEffects": false,
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@koine/browser": "2.0.0-beta.
|
|
6
|
-
"@koine/utils": "2.0.0-beta.
|
|
7
|
-
"@koine/i18n": "2.0.0-beta.
|
|
5
|
+
"@koine/browser": "2.0.0-beta.123",
|
|
6
|
+
"@koine/utils": "2.0.0-beta.123",
|
|
7
|
+
"@koine/i18n": "2.0.0-beta.123"
|
|
8
8
|
},
|
|
9
9
|
"peerDependencies": {
|
|
10
10
|
"next": "^14.0.4",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
},
|
|
57
57
|
"module": "./index.esm.js",
|
|
58
58
|
"main": "./index.cjs.js",
|
|
59
|
-
"version": "2.0.0-beta.
|
|
59
|
+
"version": "2.0.0-beta.123"
|
|
60
60
|
}
|