Skip to content

Commit 410825c

Browse files
authored
feat(compiler): support Turbopack in Next.js v14 (#1118)
1 parent bc419ae commit 410825c

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

.changeset/fresh-tables-begin.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@lingo.dev/_compiler": patch
3+
"lingo.dev": patch
4+
---
5+
6+
support Turbopack in Next.js v14 by Compiler

packages/compiler/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,8 @@ export default {
258258
// Regex for all relevant files for Lingo.dev
259259
const lingoGlob = `**/*.{ts,tsx,js,jsx}`;
260260

261-
const lingoLoaderPath = require.resolve("./lingo-turbopack-loader");
261+
// The .cjs extension is required for Next.js v14
262+
const lingoLoaderPath = require.resolve("./lingo-turbopack-loader.cjs");
262263

263264
rules[lingoGlob] = {
264265
loaders: [

0 commit comments

Comments
 (0)