@animus-ui/next-plugin 0.1.19 → 0.1.21
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/README.md +23 -2
- package/dist/index.cjs +80 -12
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +81 -13
- package/dist/loader.cjs +2 -3
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.mjs +2 -3
- package/dist/plugin.d.ts +3 -0
- package/dist/plugin.d.ts.map +1 -1
- package/dist/{turbopack-config-CaAI_L6k.mjs → turbopack-config-B4apoNIO.mjs} +3 -2
- package/dist/{turbopack-config-DDjiYVRp.cjs → turbopack-config-BnLYDcu9.cjs} +3 -2
- package/dist/turbopack-config.d.ts +1 -0
- package/dist/turbopack-config.d.ts.map +1 -1
- package/dist/turbopack-loader.cjs +3 -2
- package/dist/turbopack-loader.d.ts +4 -0
- package/dist/turbopack-loader.d.ts.map +1 -1
- package/dist/turbopack-loader.mjs +3 -2
- package/dist/types.d.ts +10 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/with-animus.d.ts +8 -2
- package/dist/with-animus.d.ts.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -27,11 +27,32 @@ export default withAnimus({
|
|
|
27
27
|
|
|
28
28
|
Turbopack support activates automatically whenever the process runs under
|
|
29
29
|
Turbopack (`next dev --turbopack`, or Next 16 where Turbopack is the
|
|
30
|
-
default) — no config change needed.
|
|
31
|
-
|
|
30
|
+
default) — no config change needed. `withAnimus(...)(nextConfig)` then
|
|
31
|
+
returns a config function: Next calls it with its phase, and extraction runs
|
|
32
|
+
before it resolves. Only `next dev` analyzes in development mode and starts
|
|
33
|
+
a watcher that re-analyzes on source changes; `next build` prunes. Per-file
|
|
32
34
|
transforms run in a stateless loader fed by generated `.animus/` artifacts.
|
|
33
35
|
tsconfig `paths` aliases are honored.
|
|
34
36
|
|
|
37
|
+
Apply config wrappers that expect an object, such as `withMDX`, to
|
|
38
|
+
`nextConfig` before passing it to `withAnimus`:
|
|
39
|
+
`withAnimus(options)(withMDX(nextConfig))`. Applied outside, a wrapper that
|
|
40
|
+
copies the config into a new object keeps its own keys and drops Animus's.
|
|
41
|
+
|
|
42
|
+
If your config is a function of its own, pass Next's phase through:
|
|
43
|
+
|
|
44
|
+
```tsx
|
|
45
|
+
export default (phase: string) =>
|
|
46
|
+
withAnimus({ system: './src/ds.ts', phase })(nextConfig);
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
The result can also be awaited, as in
|
|
50
|
+
`{ ...(await withAnimus(options)(nextConfig)) }`. Without a phase it then
|
|
51
|
+
reads `NODE_ENV=development` as `next dev` and anything else as a build. A
|
|
52
|
+
`next.config.ts` that assigns `module.exports = withAnimus(...)(...)` is
|
|
53
|
+
awaited the same way when Next compiles it, so write `export default`, or
|
|
54
|
+
pass the phase from a config function.
|
|
55
|
+
|
|
35
56
|
Because `next.config` resolves only after that first extraction, a source the
|
|
36
57
|
parser cannot finish at startup rejects the config before any watcher exists:
|
|
37
58
|
fix the syntax error and start Next again. Once the watcher runs, a later
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_turbopack_config = require("./turbopack-config-
|
|
2
|
+
const require_turbopack_config = require("./turbopack-config-BnLYDcu9.cjs");
|
|
3
3
|
let _animus_ui_extract_pipeline = require("@animus-ui/extract/pipeline");
|
|
4
4
|
let _animus_ui_extract_session = require("@animus-ui/extract/session");
|
|
5
5
|
let fs = require("fs");
|
|
@@ -205,11 +205,20 @@ var AnimusWebpackPlugin = class {
|
|
|
205
205
|
getExternalSourceEntries() {
|
|
206
206
|
return this.session.externalSourceEntries.size > 0 ? this.session.externalSourceEntries : (0, _animus_ui_extract_session.getSharedExternalEntries)();
|
|
207
207
|
}
|
|
208
|
+
/** The classification of the entries `getExternalSourceEntries` returns,
|
|
209
|
+
* from the same source. */
|
|
210
|
+
getExternalSourceSideEffects() {
|
|
211
|
+
return this.session.externalSourceEntries.size > 0 ? this.session.externalSourceSideEffects : (0, _animus_ui_extract_session.getSharedExternalSideEffects)();
|
|
212
|
+
}
|
|
208
213
|
};
|
|
209
214
|
//#endregion
|
|
210
215
|
//#region src/with-animus.ts
|
|
211
216
|
const __filename$1 = (0, url.fileURLToPath)(require("url").pathToFileURL(__filename).href);
|
|
212
217
|
const __dirname$1 = (0, path.dirname)(__filename$1);
|
|
218
|
+
/** `PHASE_DEVELOPMENT_SERVER` and `PHASE_PRODUCTION_BUILD` in
|
|
219
|
+
* `next/constants`. */
|
|
220
|
+
const PHASE_DEVELOPMENT_SERVER = "phase-development-server";
|
|
221
|
+
const PHASE_PRODUCTION_BUILD = "phase-production-build";
|
|
213
222
|
let warnedGitignore = false;
|
|
214
223
|
let warnedUnstableTurbopack = false;
|
|
215
224
|
function withAnimus(options) {
|
|
@@ -218,7 +227,8 @@ function withAnimus(options) {
|
|
|
218
227
|
"cssImportTarget",
|
|
219
228
|
"turbopack",
|
|
220
229
|
"unstable_turbopack",
|
|
221
|
-
"loaderPath"
|
|
230
|
+
"loaderPath",
|
|
231
|
+
"phase"
|
|
222
232
|
], [{
|
|
223
233
|
key: "root",
|
|
224
234
|
reason: "this driver derives its own root — Next's `dir` under webpack, `process.cwd()` under Turbopack (Next passes no dir to a config module)"
|
|
@@ -231,14 +241,18 @@ function withAnimus(options) {
|
|
|
231
241
|
console.warn("[animus-extract] `unstable_turbopack` is deprecated — rename it to `turbopack` (same shape)");
|
|
232
242
|
}
|
|
233
243
|
return (nextConfig) => {
|
|
234
|
-
if (require_turbopack_config.resolveTurbopackMode(options)) return
|
|
244
|
+
if (require_turbopack_config.resolveTurbopackMode(options)) return turbopackConfig(nextConfig, options);
|
|
235
245
|
const existingWebpack = nextConfig.webpack;
|
|
236
246
|
return {
|
|
237
247
|
...nextConfig,
|
|
238
248
|
webpack(config, context) {
|
|
239
249
|
if (existingWebpack) config = existingWebpack(config, context);
|
|
240
250
|
const rootDir = context.dir?.length ? context.dir : process.cwd();
|
|
241
|
-
const
|
|
251
|
+
const { mode } = (0, _animus_ui_extract_pipeline.resolveMode)(options.mode, () => context.dev === true ? "development" : "production");
|
|
252
|
+
const plugin = new AnimusWebpackPlugin({
|
|
253
|
+
...options,
|
|
254
|
+
mode
|
|
255
|
+
});
|
|
242
256
|
plugin.setRootDir(rootDir);
|
|
243
257
|
const sessionDir = plugin.sessionDir;
|
|
244
258
|
if (!(0, fs.existsSync)(sessionDir)) (0, fs.mkdirSync)(sessionDir, { recursive: true });
|
|
@@ -265,18 +279,28 @@ function withAnimus(options) {
|
|
|
265
279
|
config.plugins = config.plugins || [];
|
|
266
280
|
config.plugins.push(plugin);
|
|
267
281
|
const DefinePlugin = context.webpack?.DefinePlugin;
|
|
268
|
-
if (DefinePlugin) config.plugins.push(new DefinePlugin({ __ANIMUS_DEV__: JSON.stringify(
|
|
282
|
+
if (DefinePlugin) config.plugins.push(new DefinePlugin({ __ANIMUS_DEV__: JSON.stringify(mode === "development") }));
|
|
269
283
|
config.resolve = config.resolve || {};
|
|
270
284
|
config.resolve.alias = config.resolve.alias || {};
|
|
271
285
|
config.resolve.alias[_animus_ui_extract_session.ANIMUS_CSS_MODULE_ID] = (0, _animus_ui_extract_session.stylesPath)(sessionDir);
|
|
272
286
|
const sessionSystemPropsPath = (0, _animus_ui_extract_session.systemPropsPath)(sessionDir);
|
|
287
|
+
const redirectSideEffects = /* @__PURE__ */ new WeakMap();
|
|
273
288
|
config.plugins.push({ apply(compiler) {
|
|
274
289
|
compiler.hooks.normalModuleFactory.tap("AnimusVirtualResolve", (nmf) => {
|
|
275
290
|
nmf.hooks.beforeResolve.tap("AnimusVirtualResolve", (resolveData) => {
|
|
276
291
|
if (resolveData.request === "virtual:animus/system-props") resolveData.request = sessionSystemPropsPath;
|
|
277
|
-
if (resolveData.request === "virtual:animus/styles.css") resolveData.request = (0, _animus_ui_extract_session.stylesPath)(sessionDir);
|
|
292
|
+
if (resolveData.request === "virtual:animus/styles.css" || resolveData.request === _animus_ui_extract_session.ANIMUS_CSS_MODULE_ID) resolveData.request = (0, _animus_ui_extract_session.stylesPath)(sessionDir);
|
|
278
293
|
const srcEntry = plugin.getExternalSourceEntries().get(resolveData.request);
|
|
279
|
-
if (srcEntry)
|
|
294
|
+
if (srcEntry) {
|
|
295
|
+
const sideEffects = plugin.getExternalSourceSideEffects().get(resolveData.request);
|
|
296
|
+
if (sideEffects !== void 0) redirectSideEffects.set(resolveData, sideEffects);
|
|
297
|
+
resolveData.request = srcEntry;
|
|
298
|
+
}
|
|
299
|
+
});
|
|
300
|
+
nmf.hooks.afterResolve.tap("AnimusVirtualResolve", (resolveData) => {
|
|
301
|
+
const sideEffects = redirectSideEffects.get(resolveData);
|
|
302
|
+
const settings = resolveData.createData?.settings;
|
|
303
|
+
if (sideEffects !== void 0 && settings) settings.sideEffects = sideEffects;
|
|
280
304
|
});
|
|
281
305
|
});
|
|
282
306
|
} });
|
|
@@ -310,26 +334,70 @@ function bindTurbopackWatchDeathReport(outcome, rootDir) {
|
|
|
310
334
|
console.error(`[animus-extract] dev watcher for ${rootDir} died — source edits are no longer extracted; restart the dev server`);
|
|
311
335
|
};
|
|
312
336
|
}
|
|
337
|
+
function turbopackConfig(nextConfig, options) {
|
|
338
|
+
const load = (phase) => loadTurbopackFragment(options, phase).then((fragment) => mergeTurbopackFragment(nextConfig, fragment));
|
|
339
|
+
function then(onResolved, onRejected) {
|
|
340
|
+
const phase = options.phase ?? (require_turbopack_config.isTurbopackDevelopment() ? PHASE_DEVELOPMENT_SERVER : PHASE_PRODUCTION_BUILD);
|
|
341
|
+
return load(phase).then(onResolved, onRejected);
|
|
342
|
+
}
|
|
343
|
+
const config = Object.assign(load, { then });
|
|
344
|
+
Object.defineProperty(config, "then", { enumerable: false });
|
|
345
|
+
return config;
|
|
346
|
+
}
|
|
313
347
|
let liveTurbopackSession = null;
|
|
314
|
-
|
|
348
|
+
let liveTurbopackWatcher = null;
|
|
349
|
+
/** The load the live session came from. Next loads the config again after
|
|
350
|
+
* Ready (validateTurboNextConfig), and a user config may await this one
|
|
351
|
+
* besides: the same phase and root share one analysis and keep the watcher.
|
|
352
|
+
* A rejected load is dropped, so a repaired source loads again. */
|
|
353
|
+
let liveTurbopackLoad = null;
|
|
354
|
+
function loadTurbopackFragment(options, phase) {
|
|
315
355
|
const rootDir = process.cwd();
|
|
316
|
-
const
|
|
356
|
+
const key = JSON.stringify([phase, rootDir]);
|
|
357
|
+
if (liveTurbopackLoad?.key === key) return liveTurbopackLoad.fragment;
|
|
358
|
+
const fragment = analyzeForTurbopack(options, phase, rootDir);
|
|
359
|
+
const load = {
|
|
360
|
+
key,
|
|
361
|
+
fragment
|
|
362
|
+
};
|
|
363
|
+
liveTurbopackLoad = load;
|
|
364
|
+
fragment.catch(() => {
|
|
365
|
+
if (liveTurbopackLoad === load) liveTurbopackLoad = null;
|
|
366
|
+
});
|
|
367
|
+
return fragment;
|
|
368
|
+
}
|
|
369
|
+
async function analyzeForTurbopack(options, phase, rootDir) {
|
|
370
|
+
const development = phase === PHASE_DEVELOPMENT_SERVER;
|
|
371
|
+
const { mode } = (0, _animus_ui_extract_pipeline.resolveMode)(options.mode, () => development ? "development" : "production");
|
|
372
|
+
const session = new _animus_ui_extract_session.ExtractionSession({
|
|
373
|
+
...options,
|
|
374
|
+
mode
|
|
375
|
+
}, { unbundledComputedImports: true });
|
|
317
376
|
liveTurbopackSession?.close();
|
|
377
|
+
liveTurbopackWatcher?.close();
|
|
378
|
+
liveTurbopackWatcher = null;
|
|
318
379
|
liveTurbopackSession = session;
|
|
319
380
|
session.rootDir = rootDir;
|
|
320
381
|
const aliasPairs = (0, _animus_ui_extract_pipeline.readTsconfigAliasPairs)(rootDir);
|
|
321
382
|
const builtAliases = (0, _animus_ui_extract_pipeline.buildPathAliasesJson)(aliasPairs, rootDir);
|
|
322
383
|
if (builtAliases) session.pathAliasesJson = builtAliases.json;
|
|
323
384
|
await (0, _animus_ui_extract_session.runSessionPipeline)(session);
|
|
324
|
-
if (
|
|
325
|
-
|
|
385
|
+
if (development && liveTurbopackSession === session) {
|
|
386
|
+
const outcome = (0, _animus_ui_extract_session.startTurbopackWatcher)(session, rootDir);
|
|
387
|
+
bindTurbopackWatchDeathReport(outcome, rootDir);
|
|
388
|
+
if (outcome.kind === "started") liveTurbopackWatcher = outcome.handle;
|
|
389
|
+
}
|
|
390
|
+
return require_turbopack_config.buildTurbopackConfig({
|
|
326
391
|
rootDir,
|
|
327
392
|
loaderPath: require_turbopack_config.resolveTurbopackLoaderPath(__dirname$1),
|
|
328
393
|
options,
|
|
329
394
|
externalSourceEntries: session.externalSourceEntries,
|
|
330
395
|
sessionId: session.sessionId,
|
|
331
|
-
sessionDir: session.sessionDir
|
|
396
|
+
sessionDir: session.sessionDir,
|
|
397
|
+
development
|
|
332
398
|
});
|
|
399
|
+
}
|
|
400
|
+
function mergeTurbopackFragment(nextConfig, fragment) {
|
|
333
401
|
const existing = nextConfig.turbopack ?? {};
|
|
334
402
|
if (existing.rules && require_turbopack_config.ANIMUS_TURBOPACK_RULE_GLOB in existing.rules) throw new Error(`[animus-extract] turbopack.rules['${require_turbopack_config.ANIMUS_TURBOPACK_RULE_GLOB}'] is already configured — remove the consumer rule or disable unstable_turbopack`);
|
|
335
403
|
return {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export type { AnimusNextOptions } from './types';
|
|
2
2
|
export { withAnimus } from './with-animus';
|
|
3
|
-
export type { AnimusNextConfigBoundary, NextConfigInput, TurbopackNextConfig, WebpackNextConfig, } from './with-animus';
|
|
3
|
+
export type { AnimusNextConfigBoundary, NextConfigInput, TurbopackNextConfig, TurbopackNextConfigObject, WebpackNextConfig, } from './with-animus';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,YAAY,EACV,wBAAwB,EACxB,eAAe,EACf,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,YAAY,EACV,wBAAwB,EACxB,eAAe,EACf,mBAAmB,EACnB,yBAAyB,EACzB,iBAAiB,GAClB,MAAM,eAAe,CAAC"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as resolveTurbopackMode, i as resolveTurbopackLoaderPath, n as buildTurbopackConfig, o as resolveAnimusLoaderPath, r as isTurbopackDevelopment, t as ANIMUS_TURBOPACK_RULE_GLOB } from "./turbopack-config-
|
|
1
|
+
import { a as resolveTurbopackMode, i as resolveTurbopackLoaderPath, n as buildTurbopackConfig, o as resolveAnimusLoaderPath, r as isTurbopackDevelopment, t as ANIMUS_TURBOPACK_RULE_GLOB } from "./turbopack-config-B4apoNIO.mjs";
|
|
2
2
|
import { assembleStylesheet, assertKnownOptionKeys, assertNoRetiredEngineSelection, buildPathAliasesJson, isEngineTransformExtension, isPathWithinRoot, readTsconfigAliasPairs, resolveMode } from "@animus-ui/extract/pipeline";
|
|
3
|
-
import { ANIMUS_CSS_MODULE_ID, ANIMUS_CSS_MODULE_ID as ANIMUS_CSS_MODULE_ID$1, ExtractionSession, getAnalysisStartedPromise, getReplacementEpoch, getSharedCss, getSharedExternalDirs, getSharedExternalEntries, replacementEpochPath, resetAnalysisStartedPromise, runSessionPipeline, sessionArtifactDir, setAnalysisStartedPromise, setSharedEngine, startTurbopackWatcher, stylesPath, systemPropsPath } from "@animus-ui/extract/session";
|
|
3
|
+
import { ANIMUS_CSS_MODULE_ID, ANIMUS_CSS_MODULE_ID as ANIMUS_CSS_MODULE_ID$1, ExtractionSession, getAnalysisStartedPromise, getReplacementEpoch, getSharedCss, getSharedExternalDirs, getSharedExternalEntries, getSharedExternalSideEffects, replacementEpochPath, resetAnalysisStartedPromise, runSessionPipeline, sessionArtifactDir, setAnalysisStartedPromise, setSharedEngine, startTurbopackWatcher, stylesPath, systemPropsPath } from "@animus-ui/extract/session";
|
|
4
4
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
5
5
|
import { dirname, join } from "path";
|
|
6
6
|
import { fileURLToPath } from "url";
|
|
@@ -204,11 +204,20 @@ var AnimusWebpackPlugin = class {
|
|
|
204
204
|
getExternalSourceEntries() {
|
|
205
205
|
return this.session.externalSourceEntries.size > 0 ? this.session.externalSourceEntries : getSharedExternalEntries();
|
|
206
206
|
}
|
|
207
|
+
/** The classification of the entries `getExternalSourceEntries` returns,
|
|
208
|
+
* from the same source. */
|
|
209
|
+
getExternalSourceSideEffects() {
|
|
210
|
+
return this.session.externalSourceEntries.size > 0 ? this.session.externalSourceSideEffects : getSharedExternalSideEffects();
|
|
211
|
+
}
|
|
207
212
|
};
|
|
208
213
|
//#endregion
|
|
209
214
|
//#region src/with-animus.ts
|
|
210
215
|
const __filename = fileURLToPath(import.meta.url);
|
|
211
216
|
const __dirname = dirname(__filename);
|
|
217
|
+
/** `PHASE_DEVELOPMENT_SERVER` and `PHASE_PRODUCTION_BUILD` in
|
|
218
|
+
* `next/constants`. */
|
|
219
|
+
const PHASE_DEVELOPMENT_SERVER = "phase-development-server";
|
|
220
|
+
const PHASE_PRODUCTION_BUILD = "phase-production-build";
|
|
212
221
|
let warnedGitignore = false;
|
|
213
222
|
let warnedUnstableTurbopack = false;
|
|
214
223
|
function withAnimus(options) {
|
|
@@ -217,7 +226,8 @@ function withAnimus(options) {
|
|
|
217
226
|
"cssImportTarget",
|
|
218
227
|
"turbopack",
|
|
219
228
|
"unstable_turbopack",
|
|
220
|
-
"loaderPath"
|
|
229
|
+
"loaderPath",
|
|
230
|
+
"phase"
|
|
221
231
|
], [{
|
|
222
232
|
key: "root",
|
|
223
233
|
reason: "this driver derives its own root — Next's `dir` under webpack, `process.cwd()` under Turbopack (Next passes no dir to a config module)"
|
|
@@ -230,14 +240,18 @@ function withAnimus(options) {
|
|
|
230
240
|
console.warn("[animus-extract] `unstable_turbopack` is deprecated — rename it to `turbopack` (same shape)");
|
|
231
241
|
}
|
|
232
242
|
return (nextConfig) => {
|
|
233
|
-
if (resolveTurbopackMode(options)) return
|
|
243
|
+
if (resolveTurbopackMode(options)) return turbopackConfig(nextConfig, options);
|
|
234
244
|
const existingWebpack = nextConfig.webpack;
|
|
235
245
|
return {
|
|
236
246
|
...nextConfig,
|
|
237
247
|
webpack(config, context) {
|
|
238
248
|
if (existingWebpack) config = existingWebpack(config, context);
|
|
239
249
|
const rootDir = context.dir?.length ? context.dir : process.cwd();
|
|
240
|
-
const
|
|
250
|
+
const { mode } = resolveMode(options.mode, () => context.dev === true ? "development" : "production");
|
|
251
|
+
const plugin = new AnimusWebpackPlugin({
|
|
252
|
+
...options,
|
|
253
|
+
mode
|
|
254
|
+
});
|
|
241
255
|
plugin.setRootDir(rootDir);
|
|
242
256
|
const sessionDir = plugin.sessionDir;
|
|
243
257
|
if (!existsSync(sessionDir)) mkdirSync(sessionDir, { recursive: true });
|
|
@@ -264,18 +278,28 @@ function withAnimus(options) {
|
|
|
264
278
|
config.plugins = config.plugins || [];
|
|
265
279
|
config.plugins.push(plugin);
|
|
266
280
|
const DefinePlugin = context.webpack?.DefinePlugin;
|
|
267
|
-
if (DefinePlugin) config.plugins.push(new DefinePlugin({ __ANIMUS_DEV__: JSON.stringify(
|
|
281
|
+
if (DefinePlugin) config.plugins.push(new DefinePlugin({ __ANIMUS_DEV__: JSON.stringify(mode === "development") }));
|
|
268
282
|
config.resolve = config.resolve || {};
|
|
269
283
|
config.resolve.alias = config.resolve.alias || {};
|
|
270
284
|
config.resolve.alias[ANIMUS_CSS_MODULE_ID$1] = stylesPath(sessionDir);
|
|
271
285
|
const sessionSystemPropsPath = systemPropsPath(sessionDir);
|
|
286
|
+
const redirectSideEffects = /* @__PURE__ */ new WeakMap();
|
|
272
287
|
config.plugins.push({ apply(compiler) {
|
|
273
288
|
compiler.hooks.normalModuleFactory.tap("AnimusVirtualResolve", (nmf) => {
|
|
274
289
|
nmf.hooks.beforeResolve.tap("AnimusVirtualResolve", (resolveData) => {
|
|
275
290
|
if (resolveData.request === "virtual:animus/system-props") resolveData.request = sessionSystemPropsPath;
|
|
276
|
-
if (resolveData.request === "virtual:animus/styles.css") resolveData.request = stylesPath(sessionDir);
|
|
291
|
+
if (resolveData.request === "virtual:animus/styles.css" || resolveData.request === ANIMUS_CSS_MODULE_ID$1) resolveData.request = stylesPath(sessionDir);
|
|
277
292
|
const srcEntry = plugin.getExternalSourceEntries().get(resolveData.request);
|
|
278
|
-
if (srcEntry)
|
|
293
|
+
if (srcEntry) {
|
|
294
|
+
const sideEffects = plugin.getExternalSourceSideEffects().get(resolveData.request);
|
|
295
|
+
if (sideEffects !== void 0) redirectSideEffects.set(resolveData, sideEffects);
|
|
296
|
+
resolveData.request = srcEntry;
|
|
297
|
+
}
|
|
298
|
+
});
|
|
299
|
+
nmf.hooks.afterResolve.tap("AnimusVirtualResolve", (resolveData) => {
|
|
300
|
+
const sideEffects = redirectSideEffects.get(resolveData);
|
|
301
|
+
const settings = resolveData.createData?.settings;
|
|
302
|
+
if (sideEffects !== void 0 && settings) settings.sideEffects = sideEffects;
|
|
279
303
|
});
|
|
280
304
|
});
|
|
281
305
|
} });
|
|
@@ -309,26 +333,70 @@ function bindTurbopackWatchDeathReport(outcome, rootDir) {
|
|
|
309
333
|
console.error(`[animus-extract] dev watcher for ${rootDir} died — source edits are no longer extracted; restart the dev server`);
|
|
310
334
|
};
|
|
311
335
|
}
|
|
336
|
+
function turbopackConfig(nextConfig, options) {
|
|
337
|
+
const load = (phase) => loadTurbopackFragment(options, phase).then((fragment) => mergeTurbopackFragment(nextConfig, fragment));
|
|
338
|
+
function then(onResolved, onRejected) {
|
|
339
|
+
const phase = options.phase ?? (isTurbopackDevelopment() ? PHASE_DEVELOPMENT_SERVER : PHASE_PRODUCTION_BUILD);
|
|
340
|
+
return load(phase).then(onResolved, onRejected);
|
|
341
|
+
}
|
|
342
|
+
const config = Object.assign(load, { then });
|
|
343
|
+
Object.defineProperty(config, "then", { enumerable: false });
|
|
344
|
+
return config;
|
|
345
|
+
}
|
|
312
346
|
let liveTurbopackSession = null;
|
|
313
|
-
|
|
347
|
+
let liveTurbopackWatcher = null;
|
|
348
|
+
/** The load the live session came from. Next loads the config again after
|
|
349
|
+
* Ready (validateTurboNextConfig), and a user config may await this one
|
|
350
|
+
* besides: the same phase and root share one analysis and keep the watcher.
|
|
351
|
+
* A rejected load is dropped, so a repaired source loads again. */
|
|
352
|
+
let liveTurbopackLoad = null;
|
|
353
|
+
function loadTurbopackFragment(options, phase) {
|
|
314
354
|
const rootDir = process.cwd();
|
|
315
|
-
const
|
|
355
|
+
const key = JSON.stringify([phase, rootDir]);
|
|
356
|
+
if (liveTurbopackLoad?.key === key) return liveTurbopackLoad.fragment;
|
|
357
|
+
const fragment = analyzeForTurbopack(options, phase, rootDir);
|
|
358
|
+
const load = {
|
|
359
|
+
key,
|
|
360
|
+
fragment
|
|
361
|
+
};
|
|
362
|
+
liveTurbopackLoad = load;
|
|
363
|
+
fragment.catch(() => {
|
|
364
|
+
if (liveTurbopackLoad === load) liveTurbopackLoad = null;
|
|
365
|
+
});
|
|
366
|
+
return fragment;
|
|
367
|
+
}
|
|
368
|
+
async function analyzeForTurbopack(options, phase, rootDir) {
|
|
369
|
+
const development = phase === PHASE_DEVELOPMENT_SERVER;
|
|
370
|
+
const { mode } = resolveMode(options.mode, () => development ? "development" : "production");
|
|
371
|
+
const session = new ExtractionSession({
|
|
372
|
+
...options,
|
|
373
|
+
mode
|
|
374
|
+
}, { unbundledComputedImports: true });
|
|
316
375
|
liveTurbopackSession?.close();
|
|
376
|
+
liveTurbopackWatcher?.close();
|
|
377
|
+
liveTurbopackWatcher = null;
|
|
317
378
|
liveTurbopackSession = session;
|
|
318
379
|
session.rootDir = rootDir;
|
|
319
380
|
const aliasPairs = readTsconfigAliasPairs(rootDir);
|
|
320
381
|
const builtAliases = buildPathAliasesJson(aliasPairs, rootDir);
|
|
321
382
|
if (builtAliases) session.pathAliasesJson = builtAliases.json;
|
|
322
383
|
await runSessionPipeline(session);
|
|
323
|
-
if (
|
|
324
|
-
|
|
384
|
+
if (development && liveTurbopackSession === session) {
|
|
385
|
+
const outcome = startTurbopackWatcher(session, rootDir);
|
|
386
|
+
bindTurbopackWatchDeathReport(outcome, rootDir);
|
|
387
|
+
if (outcome.kind === "started") liveTurbopackWatcher = outcome.handle;
|
|
388
|
+
}
|
|
389
|
+
return buildTurbopackConfig({
|
|
325
390
|
rootDir,
|
|
326
391
|
loaderPath: resolveTurbopackLoaderPath(__dirname),
|
|
327
392
|
options,
|
|
328
393
|
externalSourceEntries: session.externalSourceEntries,
|
|
329
394
|
sessionId: session.sessionId,
|
|
330
|
-
sessionDir: session.sessionDir
|
|
395
|
+
sessionDir: session.sessionDir,
|
|
396
|
+
development
|
|
331
397
|
});
|
|
398
|
+
}
|
|
399
|
+
function mergeTurbopackFragment(nextConfig, fragment) {
|
|
332
400
|
const existing = nextConfig.turbopack ?? {};
|
|
333
401
|
if (existing.rules && ANIMUS_TURBOPACK_RULE_GLOB in existing.rules) throw new Error(`[animus-extract] turbopack.rules['${ANIMUS_TURBOPACK_RULE_GLOB}'] is already configured — remove the consumer rule or disable unstable_turbopack`);
|
|
334
402
|
return {
|
package/dist/loader.cjs
CHANGED
|
@@ -6,8 +6,7 @@ let path = require("path");
|
|
|
6
6
|
//#region src/loader.ts
|
|
7
7
|
const epochSeenForSessionDir = /* @__PURE__ */ new Set();
|
|
8
8
|
function animusLoader(source) {
|
|
9
|
-
|
|
10
|
-
if (watching && this.addDependency !== void 0) {
|
|
9
|
+
if (this.addDependency !== void 0) {
|
|
11
10
|
const sessionDir = (0, _animus_ui_extract_session.getSessionArtifactDir)();
|
|
12
11
|
if (sessionDir) {
|
|
13
12
|
const epochPath = (0, _animus_ui_extract_session.replacementEpochPath)(sessionDir);
|
|
@@ -36,7 +35,7 @@ function animusLoader(source) {
|
|
|
36
35
|
engineApi: _animus_ui_extract_session.engineApi,
|
|
37
36
|
opts: this.getOptions?.() ?? {}
|
|
38
37
|
});
|
|
39
|
-
if (!
|
|
38
|
+
if (!(this.mode !== "production") || this.addDependency === void 0) return code;
|
|
40
39
|
const extended = require_loader_core.extendedFiles(manifestJson, filename);
|
|
41
40
|
for (const file of extended) this.addDependency((0, path.join)(this.rootContext, file));
|
|
42
41
|
return code + require_loader_core.extensionLineage(extended, (0, _animus_ui_extract_session.getAnalyzedHashes)());
|
package/dist/loader.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../src/loader.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAIvD,KAAK,aAAa,GAAG,iBAAiB,GAAG;IACvC,IAAI,CAAC,EAAE,aAAa,GAAG,YAAY,GAAG,MAAM,CAAC;CAC9C,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,IAAI,EAAE,aAAa,EACnB,MAAM,EAAE,MAAM,GACb,MAAM,
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../src/loader.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAIvD,KAAK,aAAa,GAAG,iBAAiB,GAAG;IACvC,IAAI,CAAC,EAAE,aAAa,GAAG,YAAY,GAAG,MAAM,CAAC;CAC9C,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,IAAI,EAAE,aAAa,EACnB,MAAM,EAAE,MAAM,GACb,MAAM,CAkDR"}
|
package/dist/loader.mjs
CHANGED
|
@@ -6,8 +6,7 @@ import { join, relative } from "path";
|
|
|
6
6
|
//#region src/loader.ts
|
|
7
7
|
const epochSeenForSessionDir = /* @__PURE__ */ new Set();
|
|
8
8
|
function animusLoader(source) {
|
|
9
|
-
|
|
10
|
-
if (watching && this.addDependency !== void 0) {
|
|
9
|
+
if (this.addDependency !== void 0) {
|
|
11
10
|
const sessionDir = getSessionArtifactDir();
|
|
12
11
|
if (sessionDir) {
|
|
13
12
|
const epochPath = replacementEpochPath(sessionDir);
|
|
@@ -36,7 +35,7 @@ function animusLoader(source) {
|
|
|
36
35
|
engineApi,
|
|
37
36
|
opts: this.getOptions?.() ?? {}
|
|
38
37
|
});
|
|
39
|
-
if (!
|
|
38
|
+
if (!(this.mode !== "production") || this.addDependency === void 0) return code;
|
|
40
39
|
const extended = extendedFiles(manifestJson, filename);
|
|
41
40
|
for (const file of extended) this.addDependency(join(this.rootContext, file));
|
|
42
41
|
return code + extensionLineage(extended, getAnalyzedHashes());
|
package/dist/plugin.d.ts
CHANGED
|
@@ -123,5 +123,8 @@ export declare class AnimusWebpackPlugin {
|
|
|
123
123
|
getOptions(): AnimusNextOptions;
|
|
124
124
|
getExternalPackageDirs(): string[];
|
|
125
125
|
getExternalSourceEntries(): Map<string, string>;
|
|
126
|
+
/** The classification of the entries `getExternalSourceEntries` returns,
|
|
127
|
+
* from the same source. */
|
|
128
|
+
getExternalSourceSideEffects(): Map<string, boolean>;
|
|
126
129
|
}
|
|
127
130
|
//# sourceMappingURL=plugin.d.ts.map
|
package/dist/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file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AE1C,YAAY,OAAO,EAAE,iBAAiB,EASrC;IAED,OAAO,CAAC,sBAAsB;IAS9B,OAAO,CAAC,sBAAsB;IA2B9B,OAAO,CAAC,cAAc;IAyBtB,KAAK,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAmG9B;IAED;+BAC2B;YACb,gBAAgB;IAwC9B,WAAW,IAAI,IAAI,CAElB;IAED,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAEhC;IAED,OAAO,CAAC,oBAAoB,CAAS;IAErC;;;6EAGyE;IACzE,OAAO,CAAC,oBAAoB;IAqB5B,IAAI,UAAU,IAAI,MAAM,CAEvB;IAED,UAAU,IAAI,iBAAiB,CAE9B;IAED,sBAAsB,IAAI,MAAM,EAAE,CAIjC;IAED,wBAAwB,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAI9C;IAED;gCAC4B;IAC5B,4BAA4B,IAAI,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAInD;CACF"}
|
|
@@ -38,11 +38,12 @@ function rootRelativeRequest(rootDir, absPath) {
|
|
|
38
38
|
return `./${relative(rootDir, absPath).replace(/\\/g, "/")}`;
|
|
39
39
|
}
|
|
40
40
|
function buildTurbopackConfig(args) {
|
|
41
|
-
const { rootDir, loaderPath, options, externalSourceEntries, sessionId, sessionDir } = args;
|
|
41
|
+
const { rootDir, loaderPath, options, externalSourceEntries, sessionId, sessionDir, development } = args;
|
|
42
42
|
const loaderOptions = {
|
|
43
43
|
rootDir,
|
|
44
44
|
sessionId,
|
|
45
|
-
sessionDir
|
|
45
|
+
sessionDir,
|
|
46
|
+
development
|
|
46
47
|
};
|
|
47
48
|
if (options.strict !== void 0) loaderOptions.strict = options.strict;
|
|
48
49
|
if (options.cssImportTarget !== void 0) loaderOptions.cssImportTarget = options.cssImportTarget;
|
|
@@ -37,11 +37,12 @@ function rootRelativeRequest(rootDir, absPath) {
|
|
|
37
37
|
return `./${(0, path.relative)(rootDir, absPath).replace(/\\/g, "/")}`;
|
|
38
38
|
}
|
|
39
39
|
function buildTurbopackConfig(args) {
|
|
40
|
-
const { rootDir, loaderPath, options, externalSourceEntries, sessionId, sessionDir } = args;
|
|
40
|
+
const { rootDir, loaderPath, options, externalSourceEntries, sessionId, sessionDir, development } = args;
|
|
41
41
|
const loaderOptions = {
|
|
42
42
|
rootDir,
|
|
43
43
|
sessionId,
|
|
44
|
-
sessionDir
|
|
44
|
+
sessionDir,
|
|
45
|
+
development
|
|
45
46
|
};
|
|
46
47
|
if (options.strict !== void 0) loaderOptions.strict = options.strict;
|
|
47
48
|
if (options.cssImportTarget !== void 0) loaderOptions.cssImportTarget = options.cssImportTarget;
|
|
@@ -31,6 +31,7 @@ export declare function buildTurbopackConfig(args: {
|
|
|
31
31
|
externalSourceEntries: ReadonlyMap<string, string>;
|
|
32
32
|
sessionId: string;
|
|
33
33
|
sessionDir: string;
|
|
34
|
+
development: boolean;
|
|
34
35
|
}): TurbopackConfigFragment;
|
|
35
36
|
export declare function resolveTurbopackLoaderPath(pluginDir: string): string;
|
|
36
37
|
//# sourceMappingURL=turbopack-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"turbopack-config.d.ts","sourceRoot":"","sources":["../src/turbopack-config.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,yBAAyB,EAC1B,MAAM,4BAA4B,CAAC;AAKpC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD;wEACwE;AAExE,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,MAAM,GAAG,IAAI,CAAC;AAElD,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,sBAAsB,CAAA;KAAE,CAAC,CAAC;CACrE;AA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rE;AAED,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACrC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC;AAED;;;0DAG0D;AAC1D,eAAO,MAAM,0BAA0B,QAAiD,CAAC;AAEzF,OAAO,EAAE,yBAAyB,EAAE,CAAC;AAErC,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,iBAAiB,EAC1B,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,GACpD,OAAO,CAMT;AAED;0CAC0C;AAC1C,wBAAgB,sBAAsB,CACpC,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,GACpD,OAAO,CAET;AAMD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,qBAAqB,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnD,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;CACtB,GAAG,uBAAuB,CA4C1B;AAED,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAMpE"}
|
|
@@ -24,7 +24,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
24
|
enumerable: true
|
|
25
25
|
}) : target, mod));
|
|
26
26
|
//#endregion
|
|
27
|
-
const require_turbopack_config = require("./turbopack-config-
|
|
27
|
+
const require_turbopack_config = require("./turbopack-config-BnLYDcu9.cjs");
|
|
28
28
|
const require_loader_core = require("./loader-core-Cnipfewg.cjs");
|
|
29
29
|
let _animus_ui_extract_pipeline = require("@animus-ui/extract/pipeline");
|
|
30
30
|
let _animus_ui_extract_session = require("@animus-ui/extract/session");
|
|
@@ -210,8 +210,9 @@ async function runLoader(ctx, source) {
|
|
|
210
210
|
engineApi: engineApiImpl,
|
|
211
211
|
opts
|
|
212
212
|
});
|
|
213
|
+
const development = opts.development ?? require_turbopack_config.isTurbopackDevelopment();
|
|
213
214
|
const deliver = async (covering) => {
|
|
214
|
-
if (!
|
|
215
|
+
if (!development) return transform(covering.manifestJson);
|
|
215
216
|
const extended = require_loader_core.extendedFiles(covering.manifestJson, filename);
|
|
216
217
|
const generation = await coverExtendedFiles({
|
|
217
218
|
covering,
|
|
@@ -9,6 +9,10 @@ export interface TurbopackLoaderOptions extends LoaderPolicyOptions {
|
|
|
9
9
|
rootDir?: string;
|
|
10
10
|
sessionId?: string;
|
|
11
11
|
sessionDir?: string;
|
|
12
|
+
/** Decided from Next's phase when the config loads: true under `next dev`,
|
|
13
|
+
* where a watcher publishes newer generations. Absent, `NODE_ENV`
|
|
14
|
+
* decides. */
|
|
15
|
+
development?: boolean;
|
|
12
16
|
}
|
|
13
17
|
type LoaderCallback = (err: Error | null, content?: string) => void;
|
|
14
18
|
type LoaderContext = LoaderContextBase<TurbopackLoaderOptions> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"turbopack-loader.d.ts","sourceRoot":"","sources":["../src/turbopack-loader.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,MAAM,MAAM,IAAI,CAAC;AAU7B,OAAO,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,KAAK,EAEV,SAAS,EAEV,MAAM,6BAA6B,CAAC;AAUrC;;;yEAGyE;AACzE,MAAM,WAAW,sBAAuB,SAAQ,mBAAmB;IACjE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"turbopack-loader.d.ts","sourceRoot":"","sources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elopment } from "./turbopack-config-
|
|
1
|
+
import { r as isTurbopackDevelopment } from "./turbopack-config-B4apoNIO.mjs";
|
|
2
2
|
import { n as extensionLineage, r as transformWithManifest, t as extendedFiles } from "./loader-core-Dg0a-jZv.mjs";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import { buildAnalyzeProjectArgs, contentHash, createV2EngineApi, parseFilesJson } from "@animus-ui/extract/pipeline";
|
|
@@ -187,8 +187,9 @@ async function runLoader(ctx, source) {
|
|
|
187
187
|
engineApi: engineApiImpl,
|
|
188
188
|
opts
|
|
189
189
|
});
|
|
190
|
+
const development = opts.development ?? isTurbopackDevelopment();
|
|
190
191
|
const deliver = async (covering) => {
|
|
191
|
-
if (!
|
|
192
|
+
if (!development) return transform(covering.manifestJson);
|
|
192
193
|
const extended = extendedFiles(covering.manifestJson, filename);
|
|
193
194
|
const generation = await coverExtendedFiles({
|
|
194
195
|
covering,
|
package/dist/types.d.ts
CHANGED
|
@@ -18,6 +18,10 @@ export interface AnimusNextOptions {
|
|
|
18
18
|
verbose?: boolean | 'trace';
|
|
19
19
|
/** Namespace prefix for CSS variables and class names. */
|
|
20
20
|
prefix?: string;
|
|
21
|
+
/** With `prefix` set, contextual variables take the prefixed name
|
|
22
|
+
* everywhere Animus emits them, while authors keep writing the declared
|
|
23
|
+
* name. */
|
|
24
|
+
prefixContextualVars?: boolean;
|
|
21
25
|
/** Forced-emission declarations for usage the scanner cannot observe
|
|
22
26
|
* (CMS-driven variants, spread-hidden props). Absent is a no-op. */
|
|
23
27
|
staticCss?: StaticCssConfig;
|
|
@@ -38,6 +42,12 @@ export interface AnimusNextOptions {
|
|
|
38
42
|
turbopack?: {
|
|
39
43
|
mode?: 'auto' | 'on' | 'off';
|
|
40
44
|
};
|
|
45
|
+
/** Next's config phase, for a config function of your own that returns
|
|
46
|
+
* this one under Turbopack: `(phase) => withAnimus({ ...options, phase
|
|
47
|
+
* })(nextConfig)`. Next calls a config exported directly with its phase,
|
|
48
|
+
* and that phase wins. Without either, `NODE_ENV=development` reads as
|
|
49
|
+
* `next dev`. */
|
|
50
|
+
phase?: string;
|
|
41
51
|
/** @deprecated Use `turbopack` — same shape, and it wins when both are
|
|
42
52
|
* set. This alias warns once. */
|
|
43
53
|
unstable_turbopack?: {
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAEnE,MAAM,WAAW,iBAAiB;IAChC,4EAA4E;IAC5E,MAAM,EAAE,MAAM,CAAC;IACf;+EAC2E;IAC3E,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB;4EACwE;IACxE,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB;;6CAEyC;IACzC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;0EACsE;IACtE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAC5B,0DAA0D;IAC1D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;yEACqE;IACrE,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B;mDAC+C;IAC/C,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5B;wDACoD;IACpD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;yEACqE;IACrE,IAAI,CAAC,EAAE,aAAa,GAAG,YAAY,CAAC;IACpC;gFAC4E;IAC5E,MAAM,CAAC,EAAE,IAAI,CAAC;IACd;qEACiE;IACjE,SAAS,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,KAAK,CAAA;KAAE,CAAC;IAC7C;sCACkC;IAClC,kBAAkB,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,IAAI,CAAA;KA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AI,CAAA;KAAE,CAAC;IACtD;qEACiE;IACjE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;+EAC2E;IAC3E,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB"}
|
package/dist/with-animus.d.ts
CHANGED
|
@@ -40,9 +40,15 @@ export type NextConfigInput<Config extends NextOwnedConfig> = Config extends Cal
|
|
|
40
40
|
export type WebpackNextConfig<Config extends NextOwnedConfig> = Omit<Config, 'webpack'> & {
|
|
41
41
|
webpack: NextWebpackHook;
|
|
42
42
|
};
|
|
43
|
-
export type
|
|
43
|
+
export type TurbopackNextConfigObject<Config extends NextOwnedConfig> = Omit<Config, 'turbopack'> & {
|
|
44
44
|
turbopack: TurbopackOptions;
|
|
45
45
|
};
|
|
46
|
-
|
|
46
|
+
/** Next calls a function config with its phase, the one signal that tells
|
|
47
|
+
* `next dev` from `next build` while the config loads: `NODE_ENV` can be
|
|
48
|
+
* set either way, and `NEXT_PHASE` is set only after compiling. A config
|
|
49
|
+
* that wraps this one awaits it instead, and it then resolves in the
|
|
50
|
+
* `phase` option's phase, or by `NODE_ENV` without one. */
|
|
51
|
+
export type TurbopackNextConfig<Config extends NextOwnedConfig> = ((phase: string) => Promise<TurbopackNextConfigObject<Config>>) & PromiseLike<TurbopackNextConfigObject<Config>>;
|
|
52
|
+
export declare function withAnimus(options: AnimusNextOptions): <Config extends NextOwnedConfig>(nextConfig: NextConfigInput<Config>) => WebpackNextConfig<Config> | TurbopackNextConfig<Config>;
|
|
47
53
|
export declare function bindTurbopackWatchDeathReport(outcome: TurbopackWatchOutcome, rootDir: string): void;
|
|
48
54
|
//# sourceMappingURL=with-animus.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"with-animus.d.ts","sourceRoot":"","sources":["../src/with-animus.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"with-animus.d.ts","sourceRoot":"","sources":["../src/with-animus.ts"],"names":[],"mappings":"AA+BA,OAAO,KAAK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@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@animus-ui/next-plugin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.21",
|
|
4
4
|
"description": "Animus static CSS extraction for Next.js (webpack)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"animus",
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"compile": "tsc --noEmit"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@animus-ui/extract": "0.1.
|
|
43
|
+
"@animus-ui/extract": "0.1.21"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@animus-ui/assertions": "0.1.
|
|
46
|
+
"@animus-ui/assertions": "0.1.21"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@mdx-js/mdx": "^3.0.0",
|