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(
275275 id : string ,
276276) : Promise < string > {
277277 const { environment } = pluginContext
278- if ( environment . config . command === 'serve' ) {
278+ if (
279+ environment . config . command === 'serve' &&
280+ ! environment . config . experimental . rolldownDev
281+ ) {
279282 return fileToDevUrl ( environment , id )
280283 } else {
281284 return fileToBuiltUrl ( pluginContext , id )
Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ export function rolldownDevHandleConfig(
6969 build : {
7070 modulePreload : false ,
7171 cssCodeSplit : false ,
72+ assetsInlineLimit : 0 ,
7273 rollupOptions : {
7374 input :
7475 config . build ?. rollupOptions ?. input ??
@@ -189,6 +190,7 @@ class RolldownEnvironment extends DevEnvironment {
189190 'vite:build-metadata' ,
190191 'vite:css' ,
191192 'vite:css-post' ,
193+ 'vite:asset' ,
192194 ] . includes ( p . name ) ||
193195 [ 'AliasPlugin' , 'TransformPlugin' , 'LoadFallbackPlugin' ] . includes (
194196 p . constructor . name ,
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import testAlias from 'test-alias'
66import { throwError } from './error'
77// TODO: hmr
88import './test-style.css'
9+ import testStyleUrl from './test-style-url.css?url'
910import testStyleInline from './test-style-inline.css?inline'
1011
1112export function App ( ) {
@@ -25,6 +26,10 @@ export function App() {
2526 < pre >
2627 [css] < span className = "test-style" > orange</ span >
2728 </ pre >
29+ < link rel = "stylesheet" href = { testStyleUrl } />
30+ < pre >
31+ [css?url] < span className = "test-style-url" > orange</ span >
32+ </ pre >
2833 < style > { testStyleInline } </ style >
2934 < pre >
3035 [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