@fougere/next 0.4.0-alpha.0 → 0.5.0-alpha.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.
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAavC,wBAAgB,WAAW,CAAC,MAAM,GAAE,UAAe,GAAG,UAAU,CAgC/D"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAIvC,wBAAgB,WAAW,CAAC,MAAM,GAAE,UAAe,GAAG,UAAU,CAkC/D"}
package/dist/config.js CHANGED
@@ -32,23 +32,16 @@
32
32
  * Next also documents its webpack config as outside semver.
33
33
  */
34
34
  import TerserPlugin from 'terser-webpack-plugin';
35
- /** Packages a Fougere boot loads at runtime — they must not be bundled. */
36
- const RUNTIME_PACKAGES = [
37
- '@fougere/app',
38
- '@fougere/core',
39
- '@fougere/next',
40
- '@fougere/adapter-sql',
41
- 'better-sqlite3',
42
- 'jiti',
43
- 'typescript',
44
- ];
35
+ import { RUNTIME_PACKAGES } from '@fougere/core/node';
45
36
  export function withFougere(config = {}) {
46
37
  const userWebpack = config.webpack;
47
38
  return {
48
39
  ...config,
49
40
  // Additive: whatever the app already listed is kept.
50
41
  serverExternalPackages: [
51
- ...new Set([...(config.serverExternalPackages ?? []), ...RUNTIME_PACKAGES]),
42
+ // `@fougere/next` is this plugin's own package: it externalizes itself, which is a
43
+ // fact about Next and not about a Fougere boot, so it is added here and not to the list.
44
+ ...new Set([...(config.serverExternalPackages ?? []), ...RUNTIME_PACKAGES, '@fougere/next']),
52
45
  ],
53
46
  webpack: (webpackConfig, context) => {
54
47
  // The app's own webpack function runs FIRST, so it sees an untouched config
@@ -1 +1 @@
1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AS,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAU,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;gBAC/E,2EAA2E;gBAC3E,0EAA0E;gBAC1E,+DAA+D;gBAC/D,IAAI,YAAY,CAAC,EAAE,aAAa,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,EAAE,CAAC;aAC/D,CAAC;YAEF,OAAO,IAAI,CAAC;QACd,CAAC;KACF,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fougere/next",
3
- "version": "0.4.0-alpha.0",
3
+ "version": "0.5.0-alpha.0",
4
4
  "description": "The Next.js adapter: mounting, and the one import that is genuinely Next.",
5
5
  "keywords": [
6
6
  "fougere",
@@ -48,8 +48,8 @@
48
48
  ],
49
49
  "dependencies": {
50
50
  "terser-webpack-plugin": "^5.3.14",
51
- "@fougere/app": "0.4.0-alpha.0",
52
- "@fougere/core": "0.4.0-alpha.0"
51
+ "@fougere/app": "0.5.0-alpha.0",
52
+ "@fougere/core": "0.5.0-alpha.0"
53
53
  },
54
54
  "devDependencies": {
55
55
  "next": "^15.5.7",
package/src/config.ts CHANGED
@@ -34,16 +34,7 @@
34
34
  import TerserPlugin from 'terser-webpack-plugin';
35
35
  import type { NextConfig } from 'next';
36
36
 
37
- /** Packages a Fougere boot loads at runtime — they must not be bundled. */
38
- const RUNTIME_PACKAGES = [
39
- '@fougere/app',
40
- '@fougere/core',
41
- '@fougere/next',
42
- '@fougere/adapter-sql',
43
- 'better-sqlite3',
44
- 'jiti',
45
- 'typescript',
46
- ];
37
+ import { RUNTIME_PACKAGES } from '@fougere/core/node';
47
38
 
48
39
  export function withFougere(config: NextConfig = {}): NextConfig {
49
40
  const userWebpack = config.webpack;
@@ -52,7 +43,9 @@ export function withFougere(config: NextConfig = {}): NextConfig {
52
43
  ...config,
53
44
  // Additive: whatever the app already listed is kept.
54
45
  serverExternalPackages: [
55
- ...new Set([...(config.serverExternalPackages ?? []), ...RUNTIME_PACKAGES]),
46
+ // `@fougere/next` is this plugin's own package: it externalizes itself, which is a
47
+ // fact about Next and not about a Fougere boot, so it is added here and not to the list.
48
+ ...new Set([...(config.serverExternalPackages ?? []), ...RUNTIME_PACKAGES, '@fougere/next']),
56
49
  ],
57
50
  webpack: (webpackConfig, context) => {
58
51
  // The app's own webpack function runs FIRST, so it sees an untouched config