Skip to content

Commit 348c2e0

Browse files
committed
Test relative paths on windows
1 parent 6714033 commit 348c2e0

File tree

3 files changed

+47
-5
lines changed

3 files changed

+47
-5
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { button } from '../styles.css';
2+
3+
export { button };

packages/rollup-plugin/test/__snapshots__/rollup-plugin.test.ts.snap

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,11 @@ function render() {
204204
});
205205
}
206206
render();
207+
",
208+
],
209+
[
210+
"src/nested/nested.js",
211+
"export { button } from '../styles.css.js';
207212
",
208213
],
209214
[
@@ -361,6 +366,11 @@ function render() {
361366
});
362367
}
363368
render();
369+
",
370+
],
371+
[
372+
"nested/nested.js",
373+
"export { button } from '../styles.css.js';
364374
",
365375
],
366376
[
@@ -576,6 +586,14 @@ exports[`rollup-plugin Rollup settings should build with sourcemaps 1`] = `
576586
"src/index.js.map",
577587
"",
578588
],
589+
[
590+
"src/nested/nested.js",
591+
"",
592+
],
593+
[
594+
"src/nested/nested.js.map",
595+
"",
596+
],
579597
[
580598
"src/shared.css.js",
581599
";;;;;;",
@@ -737,6 +755,7 @@ html .styles_opacity_1\\/4__jteyb17 {
737755
"index.js",
738756
"import { assignInlineVars, setElementVars } from '@vanilla-extract/dynamic';
739757
import './assets/src/themes.css.ts.vanilla-s9rcEmBH.css';
758+
import { c as container, b as button, o as opacity } from './styles.css-oQ3WSjqO.js';
740759
import './assets/src/shared.css.ts.vanilla-G_Gyt4-e.css';
741760
import './assets/src/styles.css.ts.vanilla-BfisGtko.css';
742761
@@ -745,10 +764,6 @@ var responsiveTheme = "themes_responsiveTheme__cvta17e";
745764
var theme = "themes_theme__cvta170";
746765
var vars = { colors: { backgroundColor: "var(--colors-backgroundColor__cvta171)", text: "var(--colors-text__cvta172)" }, space: { "1": "var(--space-1__cvta173)", "2": "var(--space-2__cvta174)", "3": "var(--space-3__cvta175)" } };
747766
748-
var button = "styles_button__jteyb13 shared_shadow__4dtfen0 styles_iDunno__jteyb12";
749-
var container = "styles_container__jteyb11";
750-
var opacity = { "1/2": "styles_opacity_1/2__jteyb16", "1/4": "styles_opacity_1/4__jteyb17" };
751-
752767
var shadow = "shared_shadow__4dtfen0";
753768
754769
var root = "root";
@@ -854,6 +869,27 @@ function render() {
854869
});
855870
}
856871
render();
872+
",
873+
],
874+
[
875+
"nested.js",
876+
"export { b as button } from './styles.css-oQ3WSjqO.js';
877+
import './assets/src/shared.css.ts.vanilla-G_Gyt4-e.css';
878+
import './assets/src/themes.css.ts.vanilla-s9rcEmBH.css';
879+
import './assets/src/styles.css.ts.vanilla-BfisGtko.css';
880+
",
881+
],
882+
[
883+
"styles.css-oQ3WSjqO.js",
884+
"import './assets/src/shared.css.ts.vanilla-G_Gyt4-e.css';
885+
import './assets/src/themes.css.ts.vanilla-s9rcEmBH.css';
886+
import './assets/src/styles.css.ts.vanilla-BfisGtko.css';
887+
888+
var button = "styles_button__jteyb13 shared_shadow__4dtfen0 styles_iDunno__jteyb12";
889+
var container = "styles_container__jteyb11";
890+
var opacity = { "1/2": "styles_opacity_1/2__jteyb16", "1/4": "styles_opacity_1/4__jteyb17" };
891+
892+
export { button as b, container as c, opacity as o };
857893
",
858894
],
859895
]

packages/rollup-plugin/test/rollup-plugin.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ async function build({
2525
...pluginOptions
2626
}: BuildOptions) {
2727
const bundle = await rollup({
28-
input: require.resolve('@fixtures/themed/src/index.ts'),
28+
input: [
29+
require.resolve('@fixtures/themed/src/index.ts'),
30+
require.resolve('@fixtures/themed/src/nested/nested.ts'),
31+
],
2932
external: ['@vanilla-extract/dynamic'],
3033
...rollupOptions,
3134
plugins: [

0 commit comments

Comments
 (0)