-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…#18184) Co-authored-by: Hiroshi Ogawa <hi.ogawa.zz@gmail.com>
- Loading branch information
1 parent
7d47fc1
commit 8464d97
Showing
5 changed files
with
53 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
playground/css/__tests__/sass-modern-compiler-build/sass-modern-compiler.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { expect, test } from 'vitest' | ||
import { findAssetFile, isBuild } from '~utils' | ||
|
||
test.runIf(isBuild)('sass modern compiler build multiple entries', () => { | ||
expect(findAssetFile(/entry1/, 'sass-modern-compiler-build')) | ||
.toMatchInlineSnapshot(` | ||
".entry1{color:red} | ||
" | ||
`) | ||
expect(findAssetFile(/entry2/, 'sass-modern-compiler-build')) | ||
.toMatchInlineSnapshot(` | ||
".entry2{color:#00f} | ||
" | ||
`) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.entry1 { | ||
color: red; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.entry2 { | ||
color: blue; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import path from 'node:path' | ||
import { defineConfig } from 'vite' | ||
|
||
export default defineConfig({ | ||
build: { | ||
outDir: 'dist/sass-modern-compiler-build', | ||
rollupOptions: { | ||
input: { | ||
entry1: path.join( | ||
import.meta.dirname, | ||
'sass-modern-compiler-build/entry1.scss', | ||
), | ||
entry2: path.join( | ||
import.meta.dirname, | ||
'sass-modern-compiler-build/entry2.scss', | ||
), | ||
}, | ||
}, | ||
}, | ||
css: { | ||
preprocessorOptions: { | ||
scss: { | ||
api: 'modern-compiler', | ||
}, | ||
}, | ||
}, | ||
}) |