@@ -6,7 +6,6 @@ import { addTemplate, useNuxt } from '@nuxt/kit'
66import { defu } from 'defu'
77import { env , provider } from 'std-env'
88import { logger } from './runtime/logger'
9- import { hasResolvableDependency } from './util'
109
1110const autodetectableProviders = {
1211 azure_static : 'azure' ,
@@ -25,13 +24,12 @@ const autodetectableStaticProviders = {
2524
2625export const NodeRuntime : RuntimeCompatibilitySchema = {
2726 // node-server runtime
28- 'browser' : 'on-demand' , // this gets changed build start
29- 'css-inline' : 'node' ,
30- 'resvg' : 'node' ,
31- 'satori' : 'node' ,
32- 'takumi' : 'node' ,
33- 'sharp' : 'node' , // will be disabled if they're missing the dependency
34- 'emoji' : 'local' , // can bundle icons, no size constraints
27+ browser : 'on-demand' , // this gets changed build start
28+ resvg : 'node' ,
29+ satori : 'node' ,
30+ takumi : 'node' ,
31+ sharp : 'node' , // will be disabled if they're missing the dependency
32+ emoji : 'local' , // can bundle icons, no size constraints
3533}
3634
3735const NodeDevRuntime : RuntimeCompatibilitySchema = {
@@ -41,36 +39,33 @@ const NodeDevRuntime: RuntimeCompatibilitySchema = {
4139}
4240
4341const cloudflare : RuntimeCompatibilitySchema = {
44- 'browser' : 'cloudflare' ,
45- 'css-inline' : false ,
46- 'resvg' : 'wasm' ,
47- 'satori' : '0-15-wasm' ,
48- 'takumi' : 'wasm' ,
49- 'sharp' : false ,
50- 'emoji' : 'fetch' , // edge size limits - use API instead of bundling 24MB icons
51- 'wasm' : {
42+ browser : 'cloudflare' ,
43+ resvg : 'wasm' ,
44+ satori : 'wasm' ,
45+ takumi : 'wasm' ,
46+ sharp : false ,
47+ emoji : 'fetch' , // edge size limits - use API instead of bundling 24MB icons
48+ wasm : {
5249 esmImport : true ,
5350 lazy : true ,
5451 } ,
5552}
5653const awsLambda : RuntimeCompatibilitySchema = {
57- 'browser' : false ,
58- 'css-inline' : 'wasm' ,
59- 'resvg' : 'node' ,
60- 'satori' : 'node' ,
61- 'takumi' : 'node' ,
62- 'sharp' : false , // 0.33.x has issues
63- 'emoji' : 'local' , // serverless has larger size limits
54+ browser : false ,
55+ resvg : 'node' ,
56+ satori : 'node' ,
57+ takumi : 'node' ,
58+ sharp : false , // 0.33.x has issues
59+ emoji : 'local' , // serverless has larger size limits
6460}
6561
6662export const WebContainer : RuntimeCompatibilitySchema = {
67- 'browser' : false ,
68- 'css-inline' : 'wasm-fs' ,
69- 'resvg' : 'wasm-fs' ,
70- 'satori' : 'wasm-fs' ,
71- 'takumi' : 'wasm' ,
72- 'sharp' : false ,
73- 'emoji' : 'fetch' , // webcontainer has size constraints
63+ browser : false ,
64+ resvg : 'wasm-fs' ,
65+ satori : 'wasm-fs' ,
66+ takumi : 'wasm' ,
67+ sharp : false ,
68+ emoji : 'fetch' , // webcontainer has size constraints
7469}
7570
7671export const RuntimeCompatibility : Record < string , RuntimeCompatibilitySchema > = {
@@ -82,14 +77,13 @@ export const RuntimeCompatibility: Record<string, RuntimeCompatibilitySchema> =
8277 'aws-lambda' : awsLambda ,
8378 'netlify' : awsLambda ,
8479 'netlify-edge' : {
85- 'browser' : false ,
86- 'css-inline' : 'wasm' ,
87- 'resvg' : 'wasm' ,
88- 'satori' : 'node' ,
89- 'takumi' : 'wasm' ,
90- 'sharp' : false ,
91- 'emoji' : 'fetch' , // edge size limits
92- 'wasm' : {
80+ browser : false ,
81+ resvg : 'wasm' ,
82+ satori : 'node' ,
83+ takumi : 'wasm' ,
84+ sharp : false ,
85+ emoji : 'fetch' , // edge size limits
86+ wasm : {
9387 rollup : {
9488 targetEnv : 'auto-inline' ,
9589 sync : [ '@resvg/resvg-wasm/index_bg.wasm' ] ,
@@ -99,14 +93,13 @@ export const RuntimeCompatibility: Record<string, RuntimeCompatibilitySchema> =
9993 'firebase' : awsLambda ,
10094 'vercel' : awsLambda ,
10195 'vercel-edge' : {
102- 'browser' : false ,
103- 'css-inline' : false , // size constraint (2mb is max)
104- 'resvg' : 'wasm' ,
105- 'satori' : '0-15-wasm' , // 0.16+ uses WebAssembly.instantiate() blocked by edge
106- 'takumi' : 'wasm' ,
107- 'sharp' : false ,
108- 'emoji' : 'fetch' , // edge size limits - bundling 24MB icons not viable
109- 'wasm' : {
96+ browser : false ,
97+ resvg : 'wasm' ,
98+ satori : 'wasm' ,
99+ takumi : 'wasm' ,
100+ sharp : false ,
101+ emoji : 'fetch' , // edge size limits - bundling 24MB icons not viable
102+ wasm : {
110103 // lowers workers kb size
111104 esmImport : true ,
112105 lazy : true ,
@@ -152,9 +145,6 @@ export async function applyNitroPresetCompatibility(nitroConfig: NitroConfig, op
152145 const target = resolveNitroPreset ( nitroConfig )
153146 const compatibility : RuntimeCompatibilitySchema = getPresetNitroPresetCompatibility ( target )
154147
155- const hasCssInlineNode = await hasResolvableDependency ( '@css-inline/css-inline' )
156- const hasCssInlineWasm = await hasResolvableDependency ( '@css-inline/css-inline-wasm' )
157-
158148 const { resolve, detectedRenderers } = options
159149
160150 // Enable renderers based on detected component suffixes
@@ -180,11 +170,6 @@ export async function applyNitroPresetCompatibility(nitroConfig: NitroConfig, op
180170 let binding = options . compatibility ?. [ key ]
181171 if ( typeof binding === 'undefined' )
182172 binding = compatibility [ key ]
183- if ( key === 'css-inline' && typeof binding === 'string' ) {
184- if ( ( binding === 'node' && ! hasCssInlineNode ) || ( [ 'wasm' , 'wasm-fs' ] . includes ( binding ) && ! hasCssInlineWasm ) ) {
185- binding = false
186- }
187- }
188173 // @ts -expect-error untyped
189174 resolvedCompatibility [ key ] = binding
190175 return {
@@ -197,7 +182,6 @@ export async function applyNitroPresetCompatibility(nitroConfig: NitroConfig, op
197182 await applyBinding ( 'takumi' ) ,
198183 await applyBinding ( 'resvg' ) ,
199184 await applyBinding ( 'sharp' ) ,
200- await applyBinding ( 'css-inline' ) ,
201185 nitroConfig . alias || { } ,
202186 )
203187 // if we're using any wasm modules we need to enable the wasm runtime
0 commit comments