@rsbuild/core 0.6.6 → 0.6.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- (()=>{var i={841:(i,a,t)=>{const p=t(477);function parse(i){let a=i.url;if(a==null)return;let t=i._parsedUrl;if(t&&t.raw===a)return t;let e=a,l="",o;if(a.length>1){let i=a.indexOf("?",1);if(i!==-1){l=a.substring(i);e=a.substring(0,i);if(l.length>1){o=p.parse(l.substring(1))}}}return i._parsedUrl={pathname:e,search:l,query:o,raw:a}}a.parse=parse},786:(i,a)=>{const t={"3g2":"video/3gpp2","3gp":"video/3gpp","3gpp":"video/3gpp","3mf":"model/3mf",aac:"audio/aac",ac:"application/pkix-attr-cert",adp:"audio/adpcm",adts:"audio/aac",ai:"application/postscript",aml:"application/automationml-aml+xml",amlx:"application/automationml-amlx+zip",amr:"audio/amr",apng:"image/apng",appcache:"text/cache-manifest",appinstaller:"application/appinstaller",appx:"application/appx",appxbundle:"application/appxbundle",asc:"application/pgp-keys",atom:"application/atom+xml",atomcat:"application/atomcat+xml",atomdeleted:"application/atomdeleted+xml",atomsvc:"application/atomsvc+xml",au:"audio/basic",avci:"image/avci",avcs:"image/avcs",avif:"image/avif",aw:"application/applixware",bdoc:"application/bdoc",bin:"application/octet-stream",bmp:"image/bmp",bpk:"application/octet-stream",btf:"image/prs.btif",btif:"image/prs.btif",buffer:"application/octet-stream",ccxml:"application/ccxml+xml",cdfx:"application/cdfx+xml",cdmia:"application/cdmi-capability",cdmic:"application/cdmi-container",cdmid:"application/cdmi-domain",cdmio:"application/cdmi-object",cdmiq:"application/cdmi-queue",cer:"application/pkix-cert",cgm:"image/cgm",cjs:"application/node",class:"application/java-vm",coffee:"text/coffeescript",conf:"text/plain",cpl:"application/cpl+xml",cpt:"application/mac-compactpro",crl:"application/pkix-crl",css:"text/css",csv:"text/csv",cu:"application/cu-seeme",cwl:"application/cwl",cww:"application/prs.cww",davmount:"application/davmount+xml",dbk:"application/docbook+xml",deb:"application/octet-stream",def:"text/plain",deploy:"application/octet-stream",dib:"image/bmp","disposition-notification":"message/disposition-notification",dist:"application/octet-stream",distz:"application/octet-stream",dll:"application/octet-stream",dmg:"application/octet-stream",dms:"application/octet-stream",doc:"application/msword",dot:"application/msword",dpx:"image/dpx",drle:"image/dicom-rle",dsc:"text/prs.lines.tag",dssc:"application/dssc+der",dtd:"application/xml-dtd",dump:"application/octet-stream",dwd:"application/atsc-dwd+xml",ear:"application/java-archive",ecma:"application/ecmascript",elc:"application/octet-stream",emf:"image/emf",eml:"message/rfc822",emma:"application/emma+xml",emotionml:"application/emotionml+xml",eps:"application/postscript",epub:"application/epub+zip",exe:"application/octet-stream",exi:"application/exi",exp:"application/express",exr:"image/aces",ez:"application/andrew-inset",fdf:"application/fdf",fdt:"application/fdt+xml",fits:"image/fits",g3:"image/g3fax",gbr:"application/rpki-ghostbusters",geojson:"application/geo+json",gif:"image/gif",glb:"model/gltf-binary",gltf:"model/gltf+json",gml:"application/gml+xml",gpx:"application/gpx+xml",gram:"application/srgs",grxml:"application/srgs+xml",gxf:"application/gxf",gz:"application/gzip",h261:"video/h261",h263:"video/h263",h264:"video/h264",heic:"image/heic",heics:"image/heic-sequence",heif:"image/heif",heifs:"image/heif-sequence",hej2:"image/hej2k",held:"application/atsc-held+xml",hjson:"application/hjson",hlp:"application/winhlp",hqx:"application/mac-binhex40",hsj2:"image/hsj2",htm:"text/html",html:"text/html",ics:"text/calendar",ief:"image/ief",ifb:"text/calendar",iges:"model/iges",igs:"model/iges",img:"application/octet-stream",in:"text/plain",ini:"text/plain",ink:"application/inkml+xml",inkml:"application/inkml+xml",ipfix:"application/ipfix",iso:"application/octet-stream",its:"application/its+xml",jade:"text/jade",jar:"application/java-archive",jhc:"image/jphc",jls:"image/jls",jp2:"image/jp2",jpe:"image/jpeg",jpeg:"image/jpeg",jpf:"image/jpx",jpg:"image/jpeg",jpg2:"image/jp2",jpgm:"image/jpm",jpgv:"video/jpeg",jph:"image/jph",jpm:"image/jpm",jpx:"image/jpx",js:"text/javascript",json:"application/json",json5:"application/json5",jsonld:"application/ld+json",jsonml:"application/jsonml+json",jsx:"text/jsx",jt:"model/jt",jxr:"image/jxr",jxra:"image/jxra",jxrs:"image/jxrs",jxs:"image/jxs",jxsc:"image/jxsc",jxsi:"image/jxsi",jxss:"image/jxss",kar:"audio/midi",ktx:"image/ktx",ktx2:"image/ktx2",less:"text/less",lgr:"application/lgr+xml",list:"text/plain",litcoffee:"text/coffeescript",log:"text/plain",lostxml:"application/lost+xml",lrf:"application/octet-stream",m1v:"video/mpeg",m21:"application/mp21",m2a:"audio/mpeg",m2v:"video/mpeg",m3a:"audio/mpeg",m4a:"audio/mp4",m4p:"application/mp4",m4s:"video/iso.segment",ma:"application/mathematica",mads:"application/mads+xml",maei:"application/mmt-aei+xml",man:"text/troff",manifest:"text/cache-manifest",map:"application/json",mar:"application/octet-stream",markdown:"text/markdown",mathml:"application/mathml+xml",mb:"application/mathematica",mbox:"application/mbox",md:"text/markdown",mdx:"text/mdx",me:"text/troff",mesh:"model/mesh",meta4:"application/metalink4+xml",metalink:"application/metalink+xml",mets:"application/mets+xml",mft:"application/rpki-manifest",mid:"audio/midi",midi:"audio/midi",mime:"message/rfc822",mj2:"video/mj2",mjp2:"video/mj2",mjs:"text/javascript",mml:"text/mathml",mods:"application/mods+xml",mov:"video/quicktime",mp2:"audio/mpeg",mp21:"application/mp21",mp2a:"audio/mpeg",mp3:"audio/mpeg",mp4:"video/mp4",mp4a:"audio/mp4",mp4s:"application/mp4",mp4v:"video/mp4",mpd:"application/dash+xml",mpe:"video/mpeg",mpeg:"video/mpeg",mpf:"application/media-policy-dataset+xml",mpg:"video/mpeg",mpg4:"video/mp4",mpga:"audio/mpeg",mpp:"application/dash-patch+xml",mrc:"application/marc",mrcx:"application/marcxml+xml",ms:"text/troff",mscml:"application/mediaservercontrol+xml",msh:"model/mesh",msi:"application/octet-stream",msix:"application/msix",msixbundle:"application/msixbundle",msm:"application/octet-stream",msp:"application/octet-stream",mtl:"model/mtl",musd:"application/mmt-usd+xml",mxf:"application/mxf",mxmf:"audio/mobile-xmf",mxml:"application/xv+xml",n3:"text/n3",nb:"application/mathematica",nq:"application/n-quads",nt:"application/n-triples",obj:"model/obj",oda:"application/oda",oga:"audio/ogg",ogg:"audio/ogg",ogv:"video/ogg",ogx:"application/ogg",omdoc:"application/omdoc+xml",onepkg:"application/onenote",onetmp:"application/onenote",onetoc:"application/onenote",onetoc2:"application/onenote",opf:"application/oebps-package+xml",opus:"audio/ogg",otf:"font/otf",owl:"application/rdf+xml",oxps:"application/oxps",p10:"application/pkcs10",p7c:"application/pkcs7-mime",p7m:"application/pkcs7-mime",p7s:"application/pkcs7-signature",p8:"application/pkcs8",pdf:"application/pdf",pfr:"application/font-tdpfr",pgp:"application/pgp-encrypted",pkg:"application/octet-stream",pki:"application/pkixcmp",pkipath:"application/pkix-pkipath",pls:"application/pls+xml",png:"image/png",prc:"model/prc",prf:"application/pics-rules",provx:"application/provenance+xml",ps:"application/postscript",pskcxml:"application/pskc+xml",pti:"image/prs.pti",qt:"video/quicktime",raml:"application/raml+yaml",rapd:"application/route-apd+xml",rdf:"application/rdf+xml",relo:"application/p2p-overlay+xml",rif:"application/reginfo+xml",rl:"application/resource-lists+xml",rld:"application/resource-lists-diff+xml",rmi:"audio/midi",rnc:"application/relax-ng-compact-syntax",rng:"application/xml",roa:"application/rpki-roa",roff:"text/troff",rq:"application/sparql-query",rs:"application/rls-services+xml",rsat:"application/atsc-rsat+xml",rsd:"application/rsd+xml",rsheet:"application/urc-ressheet+xml",rss:"application/rss+xml",rtf:"text/rtf",rtx:"text/richtext",rusd:"application/route-usd+xml",s3m:"audio/s3m",sbml:"application/sbml+xml",scq:"application/scvp-cv-request",scs:"application/scvp-cv-response",sdp:"application/sdp",senmlx:"application/senml+xml",sensmlx:"application/sensml+xml",ser:"application/java-serialized-object",setpay:"application/set-payment-initiation",setreg:"application/set-registration-initiation",sgi:"image/sgi",sgm:"text/sgml",sgml:"text/sgml",shex:"text/shex",shf:"application/shf+xml",shtml:"text/html",sieve:"application/sieve",sig:"application/pgp-signature",sil:"audio/silk",silo:"model/mesh",siv:"application/sieve",slim:"text/slim",slm:"text/slim",sls:"application/route-s-tsid+xml",smi:"application/smil+xml",smil:"application/smil+xml",snd:"audio/basic",so:"application/octet-stream",spdx:"text/spdx",spp:"application/scvp-vp-response",spq:"application/scvp-vp-request",spx:"audio/ogg",sql:"application/sql",sru:"application/sru+xml",srx:"application/sparql-results+xml",ssdl:"application/ssdl+xml",ssml:"application/ssml+xml",stk:"application/hyperstudio",stl:"model/stl",stpx:"model/step+xml",stpxz:"model/step-xml+zip",stpz:"model/step+zip",styl:"text/stylus",stylus:"text/stylus",svg:"image/svg+xml",svgz:"image/svg+xml",swidtag:"application/swid+xml",t:"text/troff",t38:"image/t38",td:"application/urc-targetdesc+xml",tei:"application/tei+xml",teicorpus:"application/tei+xml",text:"text/plain",tfi:"application/thraud+xml",tfx:"image/tiff-fx",tif:"image/tiff",tiff:"image/tiff",toml:"application/toml",tr:"text/troff",trig:"application/trig",ts:"video/mp2t",tsd:"application/timestamped-data",tsv:"text/tab-separated-values",ttc:"font/collection",ttf:"font/ttf",ttl:"text/turtle",ttml:"application/ttml+xml",txt:"text/plain",u3d:"model/u3d",u8dsn:"message/global-delivery-status",u8hdr:"message/global-headers",u8mdn:"message/global-disposition-notification",u8msg:"message/global",ubj:"application/ubjson",uri:"text/uri-list",uris:"text/uri-list",urls:"text/uri-list",vcard:"text/vcard",vrml:"model/vrml",vtt:"text/vtt",vxml:"application/voicexml+xml",war:"application/java-archive",wasm:"application/wasm",wav:"audio/wav",weba:"audio/webm",webm:"video/webm",webmanifest:"application/manifest+json",webp:"image/webp",wgsl:"text/wgsl",wgt:"application/widget",wif:"application/watcherinfo+xml",wmf:"image/wmf",woff:"font/woff",woff2:"font/woff2",wrl:"model/vrml",wsdl:"application/wsdl+xml",wspolicy:"application/wspolicy+xml",x3d:"model/x3d+xml",x3db:"model/x3d+fastinfoset",x3dbz:"model/x3d+binary",x3dv:"model/x3d-vrml",x3dvz:"model/x3d+vrml",x3dz:"model/x3d+xml",xaml:"application/xaml+xml",xav:"application/xcap-att+xml",xca:"application/xcap-caps+xml",xcs:"application/calendar+xml",xdf:"application/xcap-diff+xml",xdssc:"application/dssc+xml",xel:"application/xcap-el+xml",xenc:"application/xenc+xml",xer:"application/patch-ops-error+xml",xfdf:"application/xfdf",xht:"application/xhtml+xml",xhtml:"application/xhtml+xml",xhvml:"application/xv+xml",xlf:"application/xliff+xml",xm:"audio/xm",xml:"text/xml",xns:"application/xcap-ns+xml",xop:"application/xop+xml",xpl:"application/xproc+xml",xsd:"application/xml",xsf:"application/prs.xsf+xml",xsl:"application/xml",xslt:"application/xml",xspf:"application/xspf+xml",xvm:"application/xv+xml",xvml:"application/xv+xml",yaml:"text/yaml",yang:"application/yang",yin:"application/yin+xml",yml:"text/yaml",zip:"application/zip"};function lookup(i){let a=(""+i).trim().toLowerCase();let p=a.lastIndexOf(".");return t[!~p?a:a.substring(++p)]}a.mimes=t;a.lookup=lookup},486:(i,a,t)=>{const p=t(147);const{join:e,normalize:l,resolve:o}=t(17);const{totalist:s}=t(190);const{parse:m}=t(841);const{lookup:n}=t(786);const noop=()=>{};function isMatch(i,a){for(let t=0;t<a.length;t++){if(a[t].test(i))return true}}function toAssume(i,a){let t=0,p,e=i.length-1;if(i.charCodeAt(e)===47){i=i.substring(0,e)}let l=[],o=`${i}/index`;for(;t<a.length;t++){p=a[t]?`.${a[t]}`:"";if(i)l.push(i+p);l.push(o+p)}return l}function viaCache(i,a,t){let p=0,e,l=toAssume(a,t);for(;p<l.length;p++){if(e=i[l[p]])return e}}function viaLocal(i,a,t,o){let s=0,m=toAssume(t,o);let n,c,r,x;for(;s<m.length;s++){n=l(e(i,r=m[s]));if(n.startsWith(i)&&p.existsSync(n)){c=p.statSync(n);if(c.isDirectory())continue;x=toHeaders(r,c,a);x["Cache-Control"]=a?"no-cache":"no-store";return{abs:n,stats:c,headers:x}}}}function is404(i,a){return a.statusCode=404,a.end()}function send(i,a,t,e,l){let o=200,s,m={};l={...l};for(let i in l){s=a.getHeader(i);if(s)l[i]=s}if(s=a.getHeader("content-type")){l["Content-Type"]=s}if(i.headers.range){o=206;let[t,p]=i.headers.range.replace("bytes=","").split("-");let s=m.end=parseInt(p,10)||e.size-1;let n=m.start=parseInt(t,10)||0;if(s>=e.size){s=e.size-1}if(n>=e.size){a.setHeader("Content-Range",`bytes */${e.size}`);a.statusCode=416;return a.end()}l["Content-Range"]=`bytes ${n}-${s}/${e.size}`;l["Content-Length"]=s-n+1;l["Accept-Ranges"]="bytes"}a.writeHead(o,l);p.createReadStream(t,m).pipe(a)}const c={".br":"br",".gz":"gzip"};function toHeaders(i,a,t){let p=c[i.slice(-3)];let e=n(i.slice(0,p&&-3))||"";if(e==="text/html")e+=";charset=utf-8";let l={"Content-Length":a.size,"Content-Type":e,"Last-Modified":a.mtime.toUTCString()};if(p)l["Content-Encoding"]=p;if(t)l["ETag"]=`W/"${a.size}-${a.mtime.getTime()}"`;return l}i.exports=function(i,a={}){i=o(i||".");let t=a.onNoMatch||is404;let p=a.setHeaders||noop;let e=a.extensions||["html","htm"];let l=a.gzip&&e.map((i=>`${i}.gz`)).concat("gz");let n=a.brotli&&e.map((i=>`${i}.br`)).concat("br");const c={};let r="/";let x=!!a.etag;let d=!!a.single;if(typeof a.single==="string"){let i=a.single.lastIndexOf(".");r+=!!~i?a.single.substring(0,i):a.single}let g=[];if(a.ignores!==false){g.push(/[/]([A-Za-z\s\d~$._-]+\.\w+){1,}$/);if(a.dotfiles)g.push(/\/\.\w/);else g.push(/\/\.well-known/);[].concat(a.ignores||[]).forEach((i=>{g.push(new RegExp(i,"i"))}))}let f=a.maxAge!=null&&`public,max-age=${a.maxAge}`;if(f&&a.immutable)f+=",immutable";else if(f&&a.maxAge===0)f+=",must-revalidate";if(!a.dev){s(i,((i,t,p)=>{if(/\.well-known[\\+\/]/.test(i)){}else if(!a.dotfiles&&/(^\.|[\\+|\/+]\.)/.test(i))return;let e=toHeaders(i,p,x);if(f)e["Cache-Control"]=f;c["/"+i.normalize().replace(/\\+/g,"/")]={abs:t,stats:p,headers:e}}))}let u=a.dev?viaLocal.bind(0,i,x):viaCache.bind(0,c);return function(i,a,o){let s=[""];let c=m(i).pathname;let f=i.headers["accept-encoding"]||"";if(l&&f.includes("gzip"))s.unshift(...l);if(n&&/(br|brotli)/i.test(f))s.unshift(...n);s.push(...e);if(c.indexOf("%")!==-1){try{c=decodeURI(c)}catch(i){}}let h=u(c,s)||d&&!isMatch(c,g)&&u(r,s);if(!h)return o?o():t(i,a);if(x&&i.headers["if-none-match"]===h.headers["ETag"]){a.writeHead(304);return a.end()}if(l||n){a.setHeader("Vary","Accept-Encoding")}p(a,c,h.stats);send(i,a,h.abs,h.stats,h.headers)}}},190:(i,a,t)=>{const{join:p,resolve:e}=t(17);const{readdirSync:l,statSync:o}=t(147);function totalist(i,a,t=""){i=e(".",i);let s=l(i);let m=0,n,c;for(;m<s.length;m++){n=p(i,s[m]);c=o(n);c.isDirectory()?totalist(n,a,p(t,s[m])):a(p(t,s[m]),n,c)}}a.totalist=totalist},147:i=>{"use strict";i.exports=require("fs")},17:i=>{"use strict";i.exports=require("path")},477:i=>{"use strict";i.exports=require("querystring")}};var a={};function __nccwpck_require__(t){var p=a[t];if(p!==undefined){return p.exports}var e=a[t]={exports:{}};var l=true;try{i[t](e,e.exports,__nccwpck_require__);l=false}finally{if(l)delete a[t]}return e.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var t=__nccwpck_require__(486);module.exports=t})();
1
+ (()=>{var i={665:(i,a,t)=>{const p=t(477);function parse(i){let a=i.url;if(a==null)return;let t=i._parsedUrl;if(t&&t.raw===a)return t;let e=a,l="",o;if(a.length>1){let i=a.indexOf("?",1);if(i!==-1){l=a.substring(i);e=a.substring(0,i);if(l.length>1){o=p.parse(l.substring(1))}}}return i._parsedUrl={pathname:e,search:l,query:o,raw:a}}a.parse=parse},786:(i,a)=>{const t={"3g2":"video/3gpp2","3gp":"video/3gpp","3gpp":"video/3gpp","3mf":"model/3mf",aac:"audio/aac",ac:"application/pkix-attr-cert",adp:"audio/adpcm",adts:"audio/aac",ai:"application/postscript",aml:"application/automationml-aml+xml",amlx:"application/automationml-amlx+zip",amr:"audio/amr",apng:"image/apng",appcache:"text/cache-manifest",appinstaller:"application/appinstaller",appx:"application/appx",appxbundle:"application/appxbundle",asc:"application/pgp-keys",atom:"application/atom+xml",atomcat:"application/atomcat+xml",atomdeleted:"application/atomdeleted+xml",atomsvc:"application/atomsvc+xml",au:"audio/basic",avci:"image/avci",avcs:"image/avcs",avif:"image/avif",aw:"application/applixware",bdoc:"application/bdoc",bin:"application/octet-stream",bmp:"image/bmp",bpk:"application/octet-stream",btf:"image/prs.btif",btif:"image/prs.btif",buffer:"application/octet-stream",ccxml:"application/ccxml+xml",cdfx:"application/cdfx+xml",cdmia:"application/cdmi-capability",cdmic:"application/cdmi-container",cdmid:"application/cdmi-domain",cdmio:"application/cdmi-object",cdmiq:"application/cdmi-queue",cer:"application/pkix-cert",cgm:"image/cgm",cjs:"application/node",class:"application/java-vm",coffee:"text/coffeescript",conf:"text/plain",cpl:"application/cpl+xml",cpt:"application/mac-compactpro",crl:"application/pkix-crl",css:"text/css",csv:"text/csv",cu:"application/cu-seeme",cwl:"application/cwl",cww:"application/prs.cww",davmount:"application/davmount+xml",dbk:"application/docbook+xml",deb:"application/octet-stream",def:"text/plain",deploy:"application/octet-stream",dib:"image/bmp","disposition-notification":"message/disposition-notification",dist:"application/octet-stream",distz:"application/octet-stream",dll:"application/octet-stream",dmg:"application/octet-stream",dms:"application/octet-stream",doc:"application/msword",dot:"application/msword",dpx:"image/dpx",drle:"image/dicom-rle",dsc:"text/prs.lines.tag",dssc:"application/dssc+der",dtd:"application/xml-dtd",dump:"application/octet-stream",dwd:"application/atsc-dwd+xml",ear:"application/java-archive",ecma:"application/ecmascript",elc:"application/octet-stream",emf:"image/emf",eml:"message/rfc822",emma:"application/emma+xml",emotionml:"application/emotionml+xml",eps:"application/postscript",epub:"application/epub+zip",exe:"application/octet-stream",exi:"application/exi",exp:"application/express",exr:"image/aces",ez:"application/andrew-inset",fdf:"application/fdf",fdt:"application/fdt+xml",fits:"image/fits",g3:"image/g3fax",gbr:"application/rpki-ghostbusters",geojson:"application/geo+json",gif:"image/gif",glb:"model/gltf-binary",gltf:"model/gltf+json",gml:"application/gml+xml",gpx:"application/gpx+xml",gram:"application/srgs",grxml:"application/srgs+xml",gxf:"application/gxf",gz:"application/gzip",h261:"video/h261",h263:"video/h263",h264:"video/h264",heic:"image/heic",heics:"image/heic-sequence",heif:"image/heif",heifs:"image/heif-sequence",hej2:"image/hej2k",held:"application/atsc-held+xml",hjson:"application/hjson",hlp:"application/winhlp",hqx:"application/mac-binhex40",hsj2:"image/hsj2",htm:"text/html",html:"text/html",ics:"text/calendar",ief:"image/ief",ifb:"text/calendar",iges:"model/iges",igs:"model/iges",img:"application/octet-stream",in:"text/plain",ini:"text/plain",ink:"application/inkml+xml",inkml:"application/inkml+xml",ipfix:"application/ipfix",iso:"application/octet-stream",its:"application/its+xml",jade:"text/jade",jar:"application/java-archive",jhc:"image/jphc",jls:"image/jls",jp2:"image/jp2",jpe:"image/jpeg",jpeg:"image/jpeg",jpf:"image/jpx",jpg:"image/jpeg",jpg2:"image/jp2",jpgm:"image/jpm",jpgv:"video/jpeg",jph:"image/jph",jpm:"image/jpm",jpx:"image/jpx",js:"text/javascript",json:"application/json",json5:"application/json5",jsonld:"application/ld+json",jsonml:"application/jsonml+json",jsx:"text/jsx",jt:"model/jt",jxr:"image/jxr",jxra:"image/jxra",jxrs:"image/jxrs",jxs:"image/jxs",jxsc:"image/jxsc",jxsi:"image/jxsi",jxss:"image/jxss",kar:"audio/midi",ktx:"image/ktx",ktx2:"image/ktx2",less:"text/less",lgr:"application/lgr+xml",list:"text/plain",litcoffee:"text/coffeescript",log:"text/plain",lostxml:"application/lost+xml",lrf:"application/octet-stream",m1v:"video/mpeg",m21:"application/mp21",m2a:"audio/mpeg",m2v:"video/mpeg",m3a:"audio/mpeg",m4a:"audio/mp4",m4p:"application/mp4",m4s:"video/iso.segment",ma:"application/mathematica",mads:"application/mads+xml",maei:"application/mmt-aei+xml",man:"text/troff",manifest:"text/cache-manifest",map:"application/json",mar:"application/octet-stream",markdown:"text/markdown",mathml:"application/mathml+xml",mb:"application/mathematica",mbox:"application/mbox",md:"text/markdown",mdx:"text/mdx",me:"text/troff",mesh:"model/mesh",meta4:"application/metalink4+xml",metalink:"application/metalink+xml",mets:"application/mets+xml",mft:"application/rpki-manifest",mid:"audio/midi",midi:"audio/midi",mime:"message/rfc822",mj2:"video/mj2",mjp2:"video/mj2",mjs:"text/javascript",mml:"text/mathml",mods:"application/mods+xml",mov:"video/quicktime",mp2:"audio/mpeg",mp21:"application/mp21",mp2a:"audio/mpeg",mp3:"audio/mpeg",mp4:"video/mp4",mp4a:"audio/mp4",mp4s:"application/mp4",mp4v:"video/mp4",mpd:"application/dash+xml",mpe:"video/mpeg",mpeg:"video/mpeg",mpf:"application/media-policy-dataset+xml",mpg:"video/mpeg",mpg4:"video/mp4",mpga:"audio/mpeg",mpp:"application/dash-patch+xml",mrc:"application/marc",mrcx:"application/marcxml+xml",ms:"text/troff",mscml:"application/mediaservercontrol+xml",msh:"model/mesh",msi:"application/octet-stream",msix:"application/msix",msixbundle:"application/msixbundle",msm:"application/octet-stream",msp:"application/octet-stream",mtl:"model/mtl",musd:"application/mmt-usd+xml",mxf:"application/mxf",mxmf:"audio/mobile-xmf",mxml:"application/xv+xml",n3:"text/n3",nb:"application/mathematica",nq:"application/n-quads",nt:"application/n-triples",obj:"model/obj",oda:"application/oda",oga:"audio/ogg",ogg:"audio/ogg",ogv:"video/ogg",ogx:"application/ogg",omdoc:"application/omdoc+xml",onepkg:"application/onenote",onetmp:"application/onenote",onetoc:"application/onenote",onetoc2:"application/onenote",opf:"application/oebps-package+xml",opus:"audio/ogg",otf:"font/otf",owl:"application/rdf+xml",oxps:"application/oxps",p10:"application/pkcs10",p7c:"application/pkcs7-mime",p7m:"application/pkcs7-mime",p7s:"application/pkcs7-signature",p8:"application/pkcs8",pdf:"application/pdf",pfr:"application/font-tdpfr",pgp:"application/pgp-encrypted",pkg:"application/octet-stream",pki:"application/pkixcmp",pkipath:"application/pkix-pkipath",pls:"application/pls+xml",png:"image/png",prc:"model/prc",prf:"application/pics-rules",provx:"application/provenance+xml",ps:"application/postscript",pskcxml:"application/pskc+xml",pti:"image/prs.pti",qt:"video/quicktime",raml:"application/raml+yaml",rapd:"application/route-apd+xml",rdf:"application/rdf+xml",relo:"application/p2p-overlay+xml",rif:"application/reginfo+xml",rl:"application/resource-lists+xml",rld:"application/resource-lists-diff+xml",rmi:"audio/midi",rnc:"application/relax-ng-compact-syntax",rng:"application/xml",roa:"application/rpki-roa",roff:"text/troff",rq:"application/sparql-query",rs:"application/rls-services+xml",rsat:"application/atsc-rsat+xml",rsd:"application/rsd+xml",rsheet:"application/urc-ressheet+xml",rss:"application/rss+xml",rtf:"text/rtf",rtx:"text/richtext",rusd:"application/route-usd+xml",s3m:"audio/s3m",sbml:"application/sbml+xml",scq:"application/scvp-cv-request",scs:"application/scvp-cv-response",sdp:"application/sdp",senmlx:"application/senml+xml",sensmlx:"application/sensml+xml",ser:"application/java-serialized-object",setpay:"application/set-payment-initiation",setreg:"application/set-registration-initiation",sgi:"image/sgi",sgm:"text/sgml",sgml:"text/sgml",shex:"text/shex",shf:"application/shf+xml",shtml:"text/html",sieve:"application/sieve",sig:"application/pgp-signature",sil:"audio/silk",silo:"model/mesh",siv:"application/sieve",slim:"text/slim",slm:"text/slim",sls:"application/route-s-tsid+xml",smi:"application/smil+xml",smil:"application/smil+xml",snd:"audio/basic",so:"application/octet-stream",spdx:"text/spdx",spp:"application/scvp-vp-response",spq:"application/scvp-vp-request",spx:"audio/ogg",sql:"application/sql",sru:"application/sru+xml",srx:"application/sparql-results+xml",ssdl:"application/ssdl+xml",ssml:"application/ssml+xml",stk:"application/hyperstudio",stl:"model/stl",stpx:"model/step+xml",stpxz:"model/step-xml+zip",stpz:"model/step+zip",styl:"text/stylus",stylus:"text/stylus",svg:"image/svg+xml",svgz:"image/svg+xml",swidtag:"application/swid+xml",t:"text/troff",t38:"image/t38",td:"application/urc-targetdesc+xml",tei:"application/tei+xml",teicorpus:"application/tei+xml",text:"text/plain",tfi:"application/thraud+xml",tfx:"image/tiff-fx",tif:"image/tiff",tiff:"image/tiff",toml:"application/toml",tr:"text/troff",trig:"application/trig",ts:"video/mp2t",tsd:"application/timestamped-data",tsv:"text/tab-separated-values",ttc:"font/collection",ttf:"font/ttf",ttl:"text/turtle",ttml:"application/ttml+xml",txt:"text/plain",u3d:"model/u3d",u8dsn:"message/global-delivery-status",u8hdr:"message/global-headers",u8mdn:"message/global-disposition-notification",u8msg:"message/global",ubj:"application/ubjson",uri:"text/uri-list",uris:"text/uri-list",urls:"text/uri-list",vcard:"text/vcard",vrml:"model/vrml",vtt:"text/vtt",vxml:"application/voicexml+xml",war:"application/java-archive",wasm:"application/wasm",wav:"audio/wav",weba:"audio/webm",webm:"video/webm",webmanifest:"application/manifest+json",webp:"image/webp",wgsl:"text/wgsl",wgt:"application/widget",wif:"application/watcherinfo+xml",wmf:"image/wmf",woff:"font/woff",woff2:"font/woff2",wrl:"model/vrml",wsdl:"application/wsdl+xml",wspolicy:"application/wspolicy+xml",x3d:"model/x3d+xml",x3db:"model/x3d+fastinfoset",x3dbz:"model/x3d+binary",x3dv:"model/x3d-vrml",x3dvz:"model/x3d+vrml",x3dz:"model/x3d+xml",xaml:"application/xaml+xml",xav:"application/xcap-att+xml",xca:"application/xcap-caps+xml",xcs:"application/calendar+xml",xdf:"application/xcap-diff+xml",xdssc:"application/dssc+xml",xel:"application/xcap-el+xml",xenc:"application/xenc+xml",xer:"application/patch-ops-error+xml",xfdf:"application/xfdf",xht:"application/xhtml+xml",xhtml:"application/xhtml+xml",xhvml:"application/xv+xml",xlf:"application/xliff+xml",xm:"audio/xm",xml:"text/xml",xns:"application/xcap-ns+xml",xop:"application/xop+xml",xpl:"application/xproc+xml",xsd:"application/xml",xsf:"application/prs.xsf+xml",xsl:"application/xml",xslt:"application/xml",xspf:"application/xspf+xml",xvm:"application/xv+xml",xvml:"application/xv+xml",yaml:"text/yaml",yang:"application/yang",yin:"application/yin+xml",yml:"text/yaml",zip:"application/zip"};function lookup(i){let a=(""+i).trim().toLowerCase();let p=a.lastIndexOf(".");return t[!~p?a:a.substring(++p)]}a.mimes=t;a.lookup=lookup},486:(i,a,t)=>{const p=t(147);const{join:e,normalize:l,resolve:o}=t(17);const{totalist:s}=t(190);const{parse:m}=t(665);const{lookup:n}=t(786);const noop=()=>{};function isMatch(i,a){for(let t=0;t<a.length;t++){if(a[t].test(i))return true}}function toAssume(i,a){let t=0,p,e=i.length-1;if(i.charCodeAt(e)===47){i=i.substring(0,e)}let l=[],o=`${i}/index`;for(;t<a.length;t++){p=a[t]?`.${a[t]}`:"";if(i)l.push(i+p);l.push(o+p)}return l}function viaCache(i,a,t){let p=0,e,l=toAssume(a,t);for(;p<l.length;p++){if(e=i[l[p]])return e}}function viaLocal(i,a,t,o){let s=0,m=toAssume(t,o);let n,c,r,x;for(;s<m.length;s++){n=l(e(i,r=m[s]));if(n.startsWith(i)&&p.existsSync(n)){c=p.statSync(n);if(c.isDirectory())continue;x=toHeaders(r,c,a);x["Cache-Control"]=a?"no-cache":"no-store";return{abs:n,stats:c,headers:x}}}}function is404(i,a){return a.statusCode=404,a.end()}function send(i,a,t,e,l){let o=200,s,m={};l={...l};for(let i in l){s=a.getHeader(i);if(s)l[i]=s}if(s=a.getHeader("content-type")){l["Content-Type"]=s}if(i.headers.range){o=206;let[t,p]=i.headers.range.replace("bytes=","").split("-");let s=m.end=parseInt(p,10)||e.size-1;let n=m.start=parseInt(t,10)||0;if(s>=e.size){s=e.size-1}if(n>=e.size){a.setHeader("Content-Range",`bytes */${e.size}`);a.statusCode=416;return a.end()}l["Content-Range"]=`bytes ${n}-${s}/${e.size}`;l["Content-Length"]=s-n+1;l["Accept-Ranges"]="bytes"}a.writeHead(o,l);p.createReadStream(t,m).pipe(a)}const c={".br":"br",".gz":"gzip"};function toHeaders(i,a,t){let p=c[i.slice(-3)];let e=n(i.slice(0,p&&-3))||"";if(e==="text/html")e+=";charset=utf-8";let l={"Content-Length":a.size,"Content-Type":e,"Last-Modified":a.mtime.toUTCString()};if(p)l["Content-Encoding"]=p;if(t)l["ETag"]=`W/"${a.size}-${a.mtime.getTime()}"`;return l}i.exports=function(i,a={}){i=o(i||".");let t=a.onNoMatch||is404;let p=a.setHeaders||noop;let e=a.extensions||["html","htm"];let l=a.gzip&&e.map((i=>`${i}.gz`)).concat("gz");let n=a.brotli&&e.map((i=>`${i}.br`)).concat("br");const c={};let r="/";let x=!!a.etag;let d=!!a.single;if(typeof a.single==="string"){let i=a.single.lastIndexOf(".");r+=!!~i?a.single.substring(0,i):a.single}let g=[];if(a.ignores!==false){g.push(/[/]([A-Za-z\s\d~$._-]+\.\w+){1,}$/);if(a.dotfiles)g.push(/\/\.\w/);else g.push(/\/\.well-known/);[].concat(a.ignores||[]).forEach((i=>{g.push(new RegExp(i,"i"))}))}let f=a.maxAge!=null&&`public,max-age=${a.maxAge}`;if(f&&a.immutable)f+=",immutable";else if(f&&a.maxAge===0)f+=",must-revalidate";if(!a.dev){s(i,((i,t,p)=>{if(/\.well-known[\\+\/]/.test(i)){}else if(!a.dotfiles&&/(^\.|[\\+|\/+]\.)/.test(i))return;let e=toHeaders(i,p,x);if(f)e["Cache-Control"]=f;c["/"+i.normalize().replace(/\\+/g,"/")]={abs:t,stats:p,headers:e}}))}let u=a.dev?viaLocal.bind(0,i,x):viaCache.bind(0,c);return function(i,a,o){let s=[""];let c=m(i).pathname;let f=i.headers["accept-encoding"]||"";if(l&&f.includes("gzip"))s.unshift(...l);if(n&&/(br|brotli)/i.test(f))s.unshift(...n);s.push(...e);if(c.indexOf("%")!==-1){try{c=decodeURI(c)}catch(i){}}let h=u(c,s)||d&&!isMatch(c,g)&&u(r,s);if(!h)return o?o():t(i,a);if(x&&i.headers["if-none-match"]===h.headers["ETag"]){a.writeHead(304);return a.end()}if(l||n){a.setHeader("Vary","Accept-Encoding")}p(a,c,h.stats);send(i,a,h.abs,h.stats,h.headers)}}},190:(i,a,t)=>{const{join:p,resolve:e}=t(17);const{readdirSync:l,statSync:o}=t(147);function totalist(i,a,t=""){i=e(".",i);let s=l(i);let m=0,n,c;for(;m<s.length;m++){n=p(i,s[m]);c=o(n);c.isDirectory()?totalist(n,a,p(t,s[m])):a(p(t,s[m]),n,c)}}a.totalist=totalist},147:i=>{"use strict";i.exports=require("fs")},17:i=>{"use strict";i.exports=require("path")},477:i=>{"use strict";i.exports=require("querystring")}};var a={};function __nccwpck_require__(t){var p=a[t];if(p!==undefined){return p.exports}var e=a[t]={exports:{}};var l=true;try{i[t](e,e.exports,__nccwpck_require__);l=false}finally{if(l)delete a[t]}return e.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var t=__nccwpck_require__(486);module.exports=t})();
@@ -39,7 +39,7 @@ const applyServerOptions = (command) => {
39
39
  command.option("-o --open [url]", "open the page in browser on startup").option("--port <port>", "specify a port number for server to listen").option("--host <host>", "specify the host that the server listens to");
40
40
  };
41
41
  function runCli() {
42
- import_commander.program.name("rsbuild").usage("<command> [options]").version("0.6.6");
42
+ import_commander.program.name("rsbuild").usage("<command> [options]").version("0.6.7");
43
43
  const devCommand = import_commander.program.command("dev");
44
44
  const buildCommand = import_commander.program.command("build");
45
45
  const previewCommand = import_commander.program.command("preview");
@@ -34,7 +34,7 @@ function prepareCli() {
34
34
  if (!npm_execpath || npm_execpath.includes("npx-cli.js") || npm_execpath.includes(".bun")) {
35
35
  console.log();
36
36
  }
37
- import_rslog.logger.greet(` ${`Rsbuild v${"0.6.6"}`}
37
+ import_rslog.logger.greet(` ${`Rsbuild v${"0.6.7"}`}
38
38
  `);
39
39
  }
40
40
  // Annotate the CommonJS export names for ESM import in node:
@@ -260,6 +260,7 @@ function getSocketUrl(urlParts, location) {
260
260
  var options = RSBUILD_CLIENT_CONFIG;
261
261
  var socketUrl = createSocketUrl(options);
262
262
  var enableOverlay = !!options.overlay;
263
+ var enableLiveReload = RSBUILD_DEV_LIVE_RELOAD;
263
264
  var isFirstCompilation = true;
264
265
  var mostRecentCompilationHash = null;
265
266
  var hasCompileErrors = false;
@@ -358,7 +359,7 @@ function tryApplyUpdates() {
358
359
  return;
359
360
  }
360
361
  if (!import.meta.webpackHot) {
361
- window.location.reload();
362
+ reloadPage();
362
363
  return;
363
364
  }
364
365
  if (!canApplyUpdates()) {
@@ -370,7 +371,7 @@ function tryApplyUpdates() {
370
371
  if (err && typeof console !== "undefined" && typeof console.error === "function") {
371
372
  console.error("[HMR] Forced reload caused by: ", err);
372
373
  }
373
- window.location.reload();
374
+ reloadPage();
374
375
  return;
375
376
  }
376
377
  if (isUpdateAvailable()) {
@@ -405,10 +406,10 @@ function onMessage(e) {
405
406
  handleSuccess();
406
407
  break;
407
408
  case "static-changed":
408
- window.location.reload();
409
+ reloadPage();
409
410
  break;
410
411
  case "content-changed":
411
- window.location.reload();
412
+ reloadPage();
412
413
  break;
413
414
  case "warnings":
414
415
  handleWarnings(message.data);
@@ -500,5 +501,10 @@ function reconnect() {
500
501
  }
501
502
  connect();
502
503
  }
504
+ function reloadPage() {
505
+ if (enableLiveReload) {
506
+ window.location.reload();
507
+ }
508
+ }
503
509
  connect();
504
510
  export { registerOverlay };
@@ -44,7 +44,7 @@ async function createContextByConfig(options, bundlerType, config = {}) {
44
44
  const context = {
45
45
  entry: (0, import_entry.getEntryObject)(config, "web"),
46
46
  targets: config.output?.targets || [],
47
- version: "0.6.6",
47
+ version: "0.6.7",
48
48
  rootPath,
49
49
  distPath,
50
50
  cachePath,
package/dist/index.d.ts CHANGED
@@ -2,13 +2,16 @@
2
2
  * The methods and types exported from this file are considered as
3
3
  * the public API of @rsbuild/core.
4
4
  */
5
+ import { rspack } from '@rspack/core';
6
+ import type * as Rspack from '@rspack/core';
5
7
  export { loadEnv } from './loadEnv';
6
8
  export { createRsbuild } from './createRsbuild';
7
9
  export { loadConfig, defineConfig } from './config';
8
10
  export declare const version: any;
11
+ export { rspack };
12
+ export type { Rspack };
9
13
  export { logger } from '@rsbuild/shared';
10
14
  export { mergeRsbuildConfig } from './mergeConfig';
11
15
  export { PLUGIN_SWC_NAME, PLUGIN_CSS_NAME, PLUGIN_SASS_NAME, PLUGIN_LESS_NAME, PLUGIN_STYLUS_NAME, } from './constants';
12
- export type { Rspack } from '@rsbuild/shared';
13
16
  export type { RsbuildConfig, DevConfig, HtmlConfig, ToolsConfig, SourceConfig, ServerConfig, OutputConfig, SecurityConfig, PerformanceConfig, ModuleFederationConfig, NormalizedConfig, NormalizedDevConfig, NormalizedHtmlConfig, NormalizedToolsConfig, NormalizedSourceConfig, NormalizedServerConfig, NormalizedOutputConfig, NormalizedSecurityConfig, NormalizedPerformanceConfig, NormalizedModuleFederationConfig, RsbuildPlugin, RsbuildPlugins, RsbuildPluginAPI, } from './types';
14
17
  export type { RsbuildMode, RsbuildEntry, RsbuildTarget, RsbuildContext, RsbuildInstance, CreateRsbuildOptions, InspectConfigOptions, OnExitFn, OnAfterBuildFn, OnAfterCreateCompilerFn, OnAfterStartDevServerFn, OnAfterStartProdServerFn, OnBeforeBuildFn, OnBeforeStartDevServerFn, OnBeforeStartProdServerFn, OnBeforeCreateCompilerFn, OnCloseDevServerFn, OnDevCompileDoneFn, ModifyBundlerChainFn, ModifyRspackConfigFn, ModifyRsbuildConfigFn, TransformFn, TransformHandler, } from '@rsbuild/shared';
package/dist/index.js CHANGED
@@ -29,16 +29,18 @@ __export(src_exports, {
29
29
  loadEnv: () => import_loadEnv.loadEnv,
30
30
  logger: () => import_shared.logger,
31
31
  mergeRsbuildConfig: () => import_mergeConfig.mergeRsbuildConfig,
32
+ rspack: () => import_core.rspack,
32
33
  version: () => version
33
34
  });
34
35
  module.exports = __toCommonJS(src_exports);
36
+ var import_core = require("@rspack/core");
35
37
  var import_loadEnv = require("./loadEnv");
36
38
  var import_createRsbuild = require("./createRsbuild");
37
39
  var import_config = require("./config");
38
40
  var import_shared = require("@rsbuild/shared");
39
41
  var import_mergeConfig = require("./mergeConfig");
40
42
  var import_constants = require("./constants");
41
- const version = "0.6.6";
43
+ const version = "0.6.7";
42
44
  // Annotate the CommonJS export names for ESM import in node:
43
45
  0 && (module.exports = {
44
46
  PLUGIN_CSS_NAME,
@@ -52,5 +54,6 @@ const version = "0.6.6";
52
54
  loadEnv,
53
55
  logger,
54
56
  mergeRsbuildConfig,
57
+ rspack,
55
58
  version
56
59
  });
@@ -96,7 +96,10 @@ function getPluginAPI({
96
96
  const transform = (descriptor, handler) => {
97
97
  const id = `rsbuild-transform-${transformId++}`;
98
98
  transformer[id] = handler;
99
- hooks.modifyBundlerChain.tap((chain) => {
99
+ hooks.modifyBundlerChain.tap((chain, { target }) => {
100
+ if (descriptor.targets && !descriptor.targets.includes(target)) {
101
+ return;
102
+ }
100
103
  const rule = chain.module.rule(id);
101
104
  if (descriptor.test) {
102
105
  rule.test(descriptor.test);
@@ -104,7 +107,9 @@ function getPluginAPI({
104
107
  if (descriptor.resourceQuery) {
105
108
  rule.resourceQuery(descriptor.resourceQuery);
106
109
  }
107
- rule.use(id).loader((0, import_node_path.join)(__dirname, "./rspack/transformLoader")).options({ id });
110
+ const loaderName = descriptor.raw ? "transformRawLoader" : "transformLoader";
111
+ const loaderPath = (0, import_node_path.join)(__dirname, `./rspack/${loaderName}`);
112
+ rule.use(id).loader(loaderPath).options({ id });
108
113
  applyTransformPlugin(chain, transformer);
109
114
  });
110
115
  };
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
7
  var __export = (target, all) => {
@@ -18,14 +16,6 @@ var __copyProps = (to, from, except, desc) => {
18
16
  }
19
17
  return to;
20
18
  };
21
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
- // If the importer is in node compatibility mode or this is not an ESM
23
- // file that has been converted to a CommonJS file using a Babel-
24
- // compatible transform (i.e. "__esModule" has not been set), then set
25
- // "default" to the CommonJS "module.exports" for node compatibility.
26
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
- mod
28
- ));
29
19
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
20
  var __publicField = (obj, key, value) => {
31
21
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
@@ -37,6 +27,7 @@ __export(moduleFederation_exports, {
37
27
  });
38
28
  module.exports = __toCommonJS(moduleFederation_exports);
39
29
  var import_shared = require("@rsbuild/shared");
30
+ var import_core = require("@rspack/core");
40
31
  class PatchSplitChunksPlugin {
41
32
  constructor(name) {
42
33
  __publicField(this, "name");
@@ -116,8 +107,7 @@ function pluginModuleFederation() {
116
107
  return;
117
108
  }
118
109
  const { options } = config.moduleFederation;
119
- const { rspack } = await Promise.resolve().then(() => __toESM(require("@rspack/core")));
120
- chain.plugin(CHAIN_ID.PLUGIN.MODULE_FEDERATION).use(rspack.container.ModuleFederationPlugin, [options]);
110
+ chain.plugin(CHAIN_ID.PLUGIN.MODULE_FEDERATION).use(import_core.rspack.container.ModuleFederationPlugin, [options]);
121
111
  if (options.name) {
122
112
  chain.plugin("mf-patch-split-chunks").use(PatchSplitChunksPlugin, [options.name]);
123
113
  }
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,22 +17,55 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
19
  };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
  var nodeAddons_exports = {};
20
30
  __export(nodeAddons_exports, {
21
31
  pluginNodeAddons: () => pluginNodeAddons
22
32
  });
23
33
  module.exports = __toCommonJS(nodeAddons_exports);
24
- var import_node_path = require("node:path");
34
+ var import_node_path = __toESM(require("node:path"));
35
+ const getFilename = (resourcePath) => {
36
+ let basename = "";
37
+ if (resourcePath) {
38
+ const parsed = import_node_path.default.parse(resourcePath);
39
+ if (parsed.dir) {
40
+ basename = parsed.name;
41
+ }
42
+ }
43
+ if (basename) {
44
+ return `${basename}.node`;
45
+ }
46
+ return null;
47
+ };
25
48
  const pluginNodeAddons = () => ({
26
49
  name: "rsbuild:node-addons",
27
50
  setup(api) {
28
- api.modifyBundlerChain(async (chain, { isServer, CHAIN_ID }) => {
29
- if (!isServer) {
30
- return;
51
+ api.transform(
52
+ { test: /\.node$/, targets: ["node"], raw: true },
53
+ ({ code, emitFile, resourcePath }) => {
54
+ const name = getFilename(resourcePath);
55
+ if (name === null) {
56
+ throw new Error(`Failed to load Node.js addon: "${resourcePath}"`);
57
+ }
58
+ emitFile(name, code);
59
+ return `
60
+ try {
61
+ const path = require("path");
62
+ process.dlopen(module, path.join(__dirname, "${name}"));
63
+ } catch (error) {
64
+ throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
65
+ }
66
+ `;
31
67
  }
32
- chain.module.rule(CHAIN_ID.RULE.NODE).test(/\.node$/).use(CHAIN_ID.USE.NODE).loader((0, import_node_path.join)(__dirname, "../rspack/nodeAddonsLoader"));
33
- });
68
+ );
34
69
  }
35
70
  });
36
71
  // Annotate the CommonJS export names for ESM import in node:
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __export = (target, all) => {
9
7
  for (var name in all)
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
17
15
  }
18
16
  return to;
19
17
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
19
  var build_exports = {};
30
20
  __export(build_exports, {
@@ -32,6 +22,7 @@ __export(build_exports, {
32
22
  });
33
23
  module.exports = __toCommonJS(build_exports);
34
24
  var import_shared = require("@rsbuild/shared");
25
+ var import_core = require("@rspack/core");
35
26
  var import_createCompiler = require("./createCompiler");
36
27
  var import_initConfigs = require("./initConfigs");
37
28
  const build = async (initOptions, { mode = "production", watch, compiler: customCompiler } = {}) => {
@@ -60,12 +51,11 @@ const build = async (initOptions, { mode = "production", watch, compiler: custom
60
51
  isFirstCompile = false;
61
52
  await p;
62
53
  };
63
- const { MultiStats: MultiStatsStor } = await Promise.resolve().then(() => __toESM(require("@rspack/core")));
64
54
  (0, import_shared.onCompileDone)(
65
55
  compiler,
66
56
  onDone,
67
57
  // @ts-expect-error type mismatch
68
- MultiStatsStor
58
+ import_core.rspack.MultiStats
69
59
  );
70
60
  if (watch) {
71
61
  compiler.watch({}, (err) => {
@@ -33,6 +33,7 @@ __export(createCompiler_exports, {
33
33
  });
34
34
  module.exports = __toCommonJS(createCompiler_exports);
35
35
  var import_shared = require("@rsbuild/shared");
36
+ var import_core = require("@rspack/core");
36
37
  var import_initConfigs = require("./initConfigs");
37
38
  var import_shared2 = require("./shared");
38
39
  async function createCompiler({
@@ -43,21 +44,20 @@ async function createCompiler({
43
44
  await context.hooks.onBeforeCreateCompiler.call({
44
45
  bundlerConfigs: rspackConfigs
45
46
  });
46
- const { rspack } = await Promise.resolve().then(() => __toESM(require("@rspack/core")));
47
- if (!await (0, import_shared2.isSatisfyRspackVersion)(rspack.rspackVersion)) {
47
+ if (!await (0, import_shared2.isSatisfyRspackVersion)(import_core.rspack.rspackVersion)) {
48
48
  throw new Error(
49
49
  `The current Rspack version does not meet the requirements, the minimum supported version of Rspack is ${import_shared.color.green(
50
50
  import_shared2.rspackMinVersion
51
51
  )}`
52
52
  );
53
53
  }
54
- const compiler = rspackConfigs.length === 1 ? rspack(rspackConfigs[0]) : rspack(rspackConfigs);
54
+ const compiler = rspackConfigs.length === 1 ? (0, import_core.rspack)(rspackConfigs[0]) : (0, import_core.rspack)(rspackConfigs);
55
55
  let isFirstCompile = true;
56
56
  let isVersionLogged = false;
57
57
  let isCompiling = false;
58
58
  const logRspackVersion = () => {
59
59
  if (!isVersionLogged) {
60
- (0, import_shared.debug)(`Use Rspack v${rspack.rspackVersion}`);
60
+ (0, import_shared.debug)(`Use Rspack v${import_core.rspack.rspackVersion}`);
61
61
  isVersionLogged = true;
62
62
  }
63
63
  };
@@ -109,12 +109,11 @@ async function createCompiler({
109
109
  isCompiling = false;
110
110
  isFirstCompile = false;
111
111
  };
112
- const { MultiStats: MultiStatsStor } = await Promise.resolve().then(() => __toESM(require("@rspack/core")));
113
112
  (0, import_shared.onCompileDone)(
114
113
  compiler,
115
114
  done,
116
115
  // @ts-expect-error type mismatch
117
- MultiStatsStor
116
+ import_core.rspack.MultiStats
118
117
  );
119
118
  await context.hooks.onAfterCreateCompiler.call({ compiler });
120
119
  (0, import_shared.debug)("create compiler done");
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __export = (target, all) => {
9
7
  for (var name in all)
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
17
15
  }
18
16
  return to;
19
17
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
19
  var minimize_exports = {};
30
20
  __export(minimize_exports, {
@@ -32,6 +22,7 @@ __export(minimize_exports, {
32
22
  });
33
23
  module.exports = __toCommonJS(minimize_exports);
34
24
  var import_shared = require("@rsbuild/shared");
25
+ var import_core = require("@rspack/core");
35
26
  const pluginMinimize = () => ({
36
27
  name: "rsbuild:minimize",
37
28
  setup(api) {
@@ -41,7 +32,7 @@ const pluginMinimize = () => ({
41
32
  if (!isMinimize) {
42
33
  return;
43
34
  }
44
- const { SwcJsMinimizerRspackPlugin, SwcCssMinimizerRspackPlugin } = await Promise.resolve().then(() => __toESM(require("@rspack/core")));
35
+ const { SwcJsMinimizerRspackPlugin, SwcCssMinimizerRspackPlugin } = import_core.rspack;
45
36
  const { minifyJs, minifyCss } = (0, import_shared.parseMinifyOptions)(config);
46
37
  if (minifyJs) {
47
38
  chain.optimization.minimizer(import_shared.CHAIN_ID.MINIMIZER.JS).use(SwcJsMinimizerRspackPlugin, [(0, import_shared.getSwcMinimizerOptions)(config)]).end();
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __export = (target, all) => {
9
7
  for (var name in all)
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
17
15
  }
18
16
  return to;
19
17
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
19
  var output_exports = {};
30
20
  __export(output_exports, {
@@ -33,6 +23,7 @@ __export(output_exports, {
33
23
  module.exports = __toCommonJS(output_exports);
34
24
  var import_node_path = require("node:path");
35
25
  var import_shared = require("@rsbuild/shared");
26
+ var import_core = require("@rspack/core");
36
27
  const pluginOutput = () => ({
37
28
  name: "rsbuild:output",
38
29
  setup(api) {
@@ -40,10 +31,9 @@ const pluginOutput = () => ({
40
31
  api.modifyBundlerChain(async (chain, { CHAIN_ID }) => {
41
32
  const config = api.getNormalizedConfig();
42
33
  if (config.output.copy) {
43
- const { CopyRspackPlugin } = await Promise.resolve().then(() => __toESM(require("@rspack/core")));
44
34
  const { copy } = config.output;
45
35
  const options = Array.isArray(copy) ? { patterns: copy } : copy;
46
- chain.plugin(CHAIN_ID.PLUGIN.COPY).use(CopyRspackPlugin, [options]);
36
+ chain.plugin(CHAIN_ID.PLUGIN.COPY).use(import_core.rspack.CopyRspackPlugin, [options]);
47
37
  }
48
38
  });
49
39
  api.modifyRspackConfig(async (rspackConfig, { isProd }) => {
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __export = (target, all) => {
9
7
  for (var name in all)
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
17
15
  }
18
16
  return to;
19
17
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
19
  var progress_exports = {};
30
20
  __export(progress_exports, {
@@ -32,6 +22,7 @@ __export(progress_exports, {
32
22
  });
33
23
  module.exports = __toCommonJS(progress_exports);
34
24
  var import_shared = require("@rsbuild/shared");
25
+ var import_core = require("@rspack/core");
35
26
  const pluginProgress = () => ({
36
27
  name: "rsbuild:progress",
37
28
  setup(api) {
@@ -43,8 +34,7 @@ const pluginProgress = () => ({
43
34
  return;
44
35
  }
45
36
  const prefix = options !== true && options.id !== void 0 ? options.id : import_shared.TARGET_ID_MAP[target];
46
- const { ProgressPlugin } = await Promise.resolve().then(() => __toESM(require("@rspack/core")));
47
- chain.plugin(CHAIN_ID.PLUGIN.PROGRESS).use(ProgressPlugin, [
37
+ chain.plugin(CHAIN_ID.PLUGIN.PROGRESS).use(import_core.rspack.ProgressPlugin, [
48
38
  {
49
39
  prefix,
50
40
  ...options === true ? {} : options
@@ -36,6 +36,7 @@ var import_node_inspector = __toESM(require("node:inspector"));
36
36
  var import_node_path = __toESM(require("node:path"));
37
37
  var import_shared = require("@rsbuild/shared");
38
38
  var import_shared2 = require("@rsbuild/shared");
39
+ var import_core = require("@rspack/core");
39
40
  const stopProfiler = (output, profileSession) => {
40
41
  if (!profileSession) {
41
42
  return;
@@ -55,10 +56,6 @@ const pluginRspackProfile = () => ({
55
56
  if (!RSPACK_PROFILE) {
56
57
  return;
57
58
  }
58
- const {
59
- experimental_registerGlobalTrace: registerGlobalTrace,
60
- experimental_cleanupGlobalTrace: cleanupGlobalTrace
61
- } = await Promise.resolve().then(() => __toESM(require("@rspack/core")));
62
59
  const timestamp = Date.now();
63
60
  const profileDir = import_node_path.default.join(
64
61
  api.context.distPath,
@@ -74,7 +71,11 @@ const pluginRspackProfile = () => ({
74
71
  const onStart = () => {
75
72
  import_shared.fse.ensureDirSync(profileDir);
76
73
  if (enableProfileTrace) {
77
- registerGlobalTrace("trace", "chrome", traceFilePath);
74
+ import_core.rspack.experimental_registerGlobalTrace(
75
+ "trace",
76
+ "chrome",
77
+ traceFilePath
78
+ );
78
79
  }
79
80
  if (enableCPUProfile) {
80
81
  profileSession = new import_node_inspector.default.Session();
@@ -96,7 +97,9 @@ const pluginRspackProfile = () => ({
96
97
  }
97
98
  });
98
99
  api.onExit(() => {
99
- enableProfileTrace && cleanupGlobalTrace();
100
+ if (enableProfileTrace) {
101
+ import_core.rspack.experimental_cleanupGlobalTrace();
102
+ }
100
103
  stopProfiler(cpuProfilePath, profileSession);
101
104
  import_shared2.logger.info(`Saved Rspack profile file to ${profileDir}`);
102
105
  });
@@ -33,6 +33,7 @@ __export(rspackConfig_exports, {
33
33
  });
34
34
  module.exports = __toCommonJS(rspackConfig_exports);
35
35
  var import_shared = require("@rsbuild/shared");
36
+ var import_core = require("@rspack/core");
36
37
  var import_htmlUtils = require("../htmlUtils");
37
38
  var import_shared2 = require("./shared");
38
39
  async function modifyRspackConfig(context, rspackConfig, utils) {
@@ -54,10 +55,9 @@ async function modifyRspackConfig(context, rspackConfig, utils) {
54
55
  }
55
56
  async function getConfigUtils(config, chainUtils) {
56
57
  const { merge } = await Promise.resolve().then(() => __toESM(require("@rsbuild/shared/webpack-merge")));
57
- const rspack = await Promise.resolve().then(() => __toESM(require("@rspack/core")));
58
58
  return {
59
59
  ...chainUtils,
60
- rspack,
60
+ rspack: import_core.rspack,
61
61
  mergeConfig: merge,
62
62
  addRules(rules) {
63
63
  const ruleArr = (0, import_shared.castArray)(rules);
@@ -118,7 +118,7 @@ async function generateRspackConfig({
118
118
  IgnorePlugin,
119
119
  ProvidePlugin,
120
120
  HotModuleReplacementPlugin
121
- } = await Promise.resolve().then(() => __toESM(require("@rspack/core")));
121
+ } = import_core.rspack;
122
122
  const chain = await (0, import_shared.modifyBundlerChain)(context, {
123
123
  ...chainUtils,
124
124
  bundler: {
@@ -0,0 +1,3 @@
1
+ import transform from './transformLoader';
2
+ export default transform;
3
+ export declare const raw = true;
@@ -26,41 +26,14 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var nodeAddonsLoader_exports = {};
30
- __export(nodeAddonsLoader_exports, {
31
- default: () => nodeAddonsLoader_default,
29
+ var transformRawLoader_exports = {};
30
+ __export(transformRawLoader_exports, {
31
+ default: () => transformRawLoader_default,
32
32
  raw: () => raw
33
33
  });
34
- module.exports = __toCommonJS(nodeAddonsLoader_exports);
35
- var import_node_path = __toESM(require("node:path"));
36
- const getFilename = (resourcePath) => {
37
- let basename = "";
38
- if (resourcePath) {
39
- const parsed = import_node_path.default.parse(resourcePath);
40
- if (parsed.dir) {
41
- basename = parsed.name;
42
- }
43
- }
44
- if (basename) {
45
- return `${basename}.node`;
46
- }
47
- return null;
48
- };
49
- function nodeAddonsLoader_default(source) {
50
- const name = getFilename(this.resourcePath);
51
- if (name === null) {
52
- throw new Error(`Failed to load Node.js addon: "${this.resourcePath}"`);
53
- }
54
- this.emitFile(name, source);
55
- return `
56
- try {
57
- const path = require("path");
58
- process.dlopen(module, path.join(__dirname, "${name}"));
59
- } catch (error) {
60
- throw new Error('Failed to load Node.js addon: "${name}"\\n' + error);
61
- }
62
- `;
63
- }
34
+ module.exports = __toCommonJS(transformRawLoader_exports);
35
+ var import_transformLoader = __toESM(require("./transformLoader"));
36
+ var transformRawLoader_default = import_transformLoader.default;
64
37
  const raw = true;
65
38
  // Annotate the CommonJS export names for ESM import in node:
66
39
  0 && (module.exports = {
@@ -99,6 +99,7 @@ class CompilerDevMiddleware {
99
99
  callbacks,
100
100
  clientPaths,
101
101
  clientConfig: devConfig.client,
102
+ liveReload: devConfig.liveReload,
102
103
  writeToDisk: devConfig.writeToDisk,
103
104
  serverSideRender: true,
104
105
  // weak is enough in dev
@@ -36,13 +36,15 @@ var import_webpack_dev_middleware = __toESM(require("@rsbuild/shared/webpack-dev
36
36
  function applyHMREntry({
37
37
  compiler,
38
38
  clientPaths,
39
- clientConfig = {}
39
+ clientConfig = {},
40
+ liveReload = true
40
41
  }) {
41
42
  if (!(0, import_shared.isClientCompiler)(compiler)) {
42
43
  return;
43
44
  }
44
45
  new compiler.webpack.DefinePlugin({
45
- RSBUILD_CLIENT_CONFIG: JSON.stringify(clientConfig)
46
+ RSBUILD_CLIENT_CONFIG: JSON.stringify(clientConfig),
47
+ RSBUILD_DEV_LIVE_RELOAD: liveReload
46
48
  }).apply(compiler);
47
49
  for (const clientPath of clientPaths) {
48
50
  new compiler.webpack.EntryPlugin(compiler.context, clientPath, {
@@ -51,13 +53,14 @@ function applyHMREntry({
51
53
  }
52
54
  }
53
55
  const getDevMiddleware = (multiCompiler) => (options) => {
54
- const { clientPaths, clientConfig, callbacks, ...restOptions } = options;
56
+ const { clientPaths, clientConfig, callbacks, liveReload, ...restOptions } = options;
55
57
  const setupCompiler = (compiler) => {
56
58
  if (clientPaths) {
57
59
  applyHMREntry({
58
60
  compiler,
59
61
  clientPaths,
60
- clientConfig
62
+ clientConfig,
63
+ liveReload
61
64
  });
62
65
  }
63
66
  (0, import_shared.setupServerHooks)(compiler, callbacks);
@@ -50,4 +50,5 @@ export declare const getDevOptions: ({ rsbuildConfig, getPortSilently, }: {
50
50
  port: number;
51
51
  host: string;
52
52
  https: boolean;
53
+ liveReload: boolean | undefined;
53
54
  }>;
@@ -136,7 +136,8 @@ const mergeDevOptions = ({
136
136
  // By default it is set to "location.protocol === 'https:' ? 'wss' : 'ws'""
137
137
  protocol: void 0
138
138
  },
139
- writeToDisk: false
139
+ writeToDisk: false,
140
+ liveReload: true
140
141
  };
141
142
  const devConfig = rsbuildConfig.dev ? (0, import_shared.deepmerge)(defaultDevConfig, rsbuildConfig.dev) : defaultDevConfig;
142
143
  return devConfig;
@@ -214,12 +215,14 @@ const getDevOptions = async ({
214
215
  getPortSilently
215
216
  });
216
217
  const devConfig = mergeDevOptions({ rsbuildConfig, port });
218
+ const liveReload = devConfig.liveReload;
217
219
  return {
218
220
  devConfig,
219
221
  serverConfig,
220
222
  port,
221
223
  host,
222
- https
224
+ https,
225
+ liveReload
223
226
  };
224
227
  };
225
228
  // Annotate the CommonJS export names for ESM import in node:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/core",
3
- "version": "0.6.6",
3
+ "version": "0.6.7",
4
4
  "description": "The Rspack-based build tool.",
5
5
  "homepage": "https://rsbuild.dev",
6
6
  "bugs": {
@@ -53,12 +53,25 @@
53
53
  "core-js": "~3.36.0",
54
54
  "html-webpack-plugin": "npm:html-rspack-plugin@5.6.2",
55
55
  "postcss": "^8.4.38",
56
- "@rsbuild/shared": "0.6.6"
56
+ "@rsbuild/shared": "0.6.7"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@types/node": "18.x",
60
+ "@types/on-finished": "2.3.4",
61
+ "@types/ws": "^8.5.10",
62
+ "commander": "^12.0.0",
63
+ "connect-history-api-fallback": "^2.0.0",
64
+ "dotenv": "16.4.5",
65
+ "dotenv-expand": "11.0.6",
66
+ "http-compression": "1.0.19",
67
+ "launch-editor-middleware": "^2.6.1",
68
+ "on-finished": "2.4.1",
69
+ "open": "^8.4.0",
70
+ "prebundle": "1.0.3",
71
+ "sirv": "^2.0.4",
60
72
  "typescript": "^5.4.2",
61
- "webpack": "^5.91.0"
73
+ "webpack": "^5.91.0",
74
+ "ws": "^8.16.0"
62
75
  },
63
76
  "engines": {
64
77
  "node": ">=16.0.0"
@@ -70,6 +83,7 @@
70
83
  },
71
84
  "scripts": {
72
85
  "build": "modern build",
73
- "dev": "modern build --watch"
86
+ "dev": "modern build --watch",
87
+ "prebundle": "prebundle"
74
88
  }
75
89
  }
@@ -1,3 +0,0 @@
1
- import type { Rspack } from '@rsbuild/shared';
2
- export default function (this: Rspack.LoaderContext, source: string): string;
3
- export declare const raw = true;