Skip to content

Commit a3eed1d

Browse files
committed
Add gitignore in turbopack
1 parent 6968cf9 commit a3eed1d

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

.changeset/spotty-pets-sell.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@devup-ui/next-plugin": patch
3+
---
4+
5+
Add gitIgnore in turbopack

packages/next-plugin/src/__tests__/plugin.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ describe('plugin', () => {
138138
resolve('df', 'devup-ui.css'),
139139
'/* devup-ui */',
140140
)
141+
expect(writeFileSync).toHaveBeenCalledWith(join('df', '.gitignore'), '*')
141142
})
142143
})
143144
})

packages/next-plugin/src/plugin.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@ export function DevupUI(
3535

3636
const sheetFile = join(interfacePath, 'sheet.json')
3737
const classMapFile = join(interfacePath, 'classMap.json')
38+
const gitignoreFile = join(interfacePath, '.gitignore')
3839
if (!existsSync(interfacePath)) mkdirSync(interfacePath)
3940
if (!existsSync(cssFile)) writeFileSync(cssFile, '/* devup-ui */')
41+
if (!existsSync(gitignoreFile)) writeFileSync(gitignoreFile, '*')
4042
const rules: NonNullable<typeof config.turbopack.rules> = {
4143
[basename(cssFile)]: [
4244
{

0 commit comments

Comments
 (0)