File tree Expand file tree Collapse file tree 4 files changed +14
-1
lines changed
playground/rolldown-dev-react/src Expand file tree Collapse file tree 4 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -275,7 +275,10 @@ export async function fileToUrl(
275
275
id : string ,
276
276
) : Promise < string > {
277
277
const { environment } = pluginContext
278
- if ( environment . config . command === 'serve' ) {
278
+ if (
279
+ environment . config . command === 'serve' &&
280
+ ! environment . config . experimental . rolldownDev
281
+ ) {
279
282
return fileToDevUrl ( environment , id )
280
283
} else {
281
284
return fileToBuiltUrl ( pluginContext , id )
Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ export function rolldownDevHandleConfig(
69
69
build : {
70
70
modulePreload : false ,
71
71
cssCodeSplit : false ,
72
+ assetsInlineLimit : 0 ,
72
73
rollupOptions : {
73
74
input :
74
75
config . build ?. rollupOptions ?. input ??
@@ -189,6 +190,7 @@ class RolldownEnvironment extends DevEnvironment {
189
190
'vite:build-metadata' ,
190
191
'vite:css' ,
191
192
'vite:css-post' ,
193
+ 'vite:asset' ,
192
194
] . includes ( p . name ) ||
193
195
[ 'AliasPlugin' , 'TransformPlugin' , 'LoadFallbackPlugin' ] . includes (
194
196
p . constructor . name ,
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import testAlias from 'test-alias'
6
6
import { throwError } from './error'
7
7
// TODO: hmr
8
8
import './test-style.css'
9
+ import testStyleUrl from './test-style-url.css?url'
9
10
import testStyleInline from './test-style-inline.css?inline'
10
11
11
12
export function App ( ) {
@@ -25,6 +26,10 @@ export function App() {
25
26
< pre >
26
27
[css] < span className = "test-style" > orange</ span >
27
28
</ pre >
29
+ < link rel = "stylesheet" href = { testStyleUrl } />
30
+ < pre >
31
+ [css?url] < span className = "test-style-url" > orange</ span >
32
+ </ pre >
28
33
< style > { testStyleInline } </ style >
29
34
< pre >
30
35
[css?inline] < span className = "test-style-inline" > orange</ span >
Original file line number Diff line number Diff line change
1
+ .test-style-url {
2
+ color : orange;
3
+ }
You can’t perform that action at this time.
0 commit comments