chore: remove duplicate error

pull/18058/head
paoloricciuti 5 months ago
parent 0031d8fbdd
commit 883611fd8b

@ -695,12 +695,6 @@ HTML restricts where certain elements can appear. In case of a violation the bro
- `<option><div>option a</div></option>` will result in `<option>option a</option>` (the `<div>` is removed) - `<option><div>option a</div></option>` will result in `<option>option a</option>` (the `<div>` is removed)
- `<table><tr><td>cell</td></tr></table>` will result in `<table><tbody><tr><td>cell</td></tr></tbody></table>` (a `<tbody>` is auto-inserted) - `<table><tr><td>cell</td></tr></table>` will result in `<table><tbody><tr><td>cell</td></tr></tbody></table>` (a `<tbody>` is auto-inserted)
### options_css_injected_with_custom_renderer
```
`css: "injected"` is not compatible with `customRenderer` — custom renderers do not support CSS injection
```
### options_invalid_value ### options_invalid_value
``` ```

@ -1,7 +1,3 @@
## options_css_injected_with_custom_renderer
> `css: "injected"` is not compatible with `customRenderer` — custom renderers do not support CSS injection
## options_invalid_value ## options_invalid_value
> Invalid compiler option: %details% > Invalid compiler option: %details%

@ -47,15 +47,6 @@ function e(node, code, message) {
throw new InternalCompileError(code, message, start !== undefined ? [start, end ?? start] : undefined); throw new InternalCompileError(code, message, start !== undefined ? [start, end ?? start] : undefined);
} }
/**
* `css: "injected"` is not compatible with `customRenderer` custom renderers do not support CSS injection
* @param {null | number | NodeLike} node
* @returns {never}
*/
export function options_css_injected_with_custom_renderer(node) {
e(node, 'options_css_injected_with_custom_renderer', `\`css: "injected"\` is not compatible with \`customRenderer\` — custom renderers do not support CSS injection\nhttps://svelte.dev/e/options_css_injected_with_custom_renderer`);
}
/** /**
* Invalid compiler option: %details% * Invalid compiler option: %details%
* @param {null | number | NodeLike} node * @param {null | number | NodeLike} node

@ -202,7 +202,7 @@ export default function read_options(node) {
const css_attribute = node.attributes.find( const css_attribute = node.attributes.find(
(/** @type {any} */ a) => a.type === 'Attribute' && a.name === 'css' (/** @type {any} */ a) => a.type === 'Attribute' && a.name === 'css'
); );
e.options_css_injected_with_custom_renderer(css_attribute ?? node); e.incompatible_with_custom_renderer(css_attribute ?? node, "`css: 'injected'`");
} }
return component_options; return component_options;

@ -470,7 +470,7 @@ export function analyze_component(root, source, options) {
const custom_renderer = options.experimental.customRenderer?.({ filename: options.filename }); const custom_renderer = options.experimental.customRenderer?.({ filename: options.filename });
if (css === 'injected' && custom_renderer !== undefined) { if (css === 'injected' && custom_renderer !== undefined) {
e.options_css_injected_with_custom_renderer(null); e.incompatible_with_custom_renderer(null, "`css: 'injected'`");
} }
const custom_element = options.customElementOptions ?? custom_element_from_option; const custom_element = options.customElementOptions ?? custom_element_from_option;

@ -4,6 +4,5 @@ export default test({
compileOptions: { compileOptions: {
css: 'injected' css: 'injected'
}, },
compile_error: compile_error: "`css: 'injected'` is not compatible with `customRenderer`"
'`css: "injected"` is not compatible with `customRenderer` — custom renderers do not support CSS injection'
}); });

@ -1,6 +1,5 @@
import { test } from '../../test'; import { test } from '../../test';
export default test({ export default test({
compile_error: compile_error: "`css: 'injected'` is not compatible with `customRenderer`"
'`css: "injected"` is not compatible with `customRenderer` — custom renderers do not support CSS injection'
}); });

@ -1,6 +1,5 @@
import { test } from '../../test'; import { test } from '../../test';
export default test({ export default test({
compile_error: compile_error: "`css: 'injected'` is not compatible with `customRenderer`"
'`css: "injected"` is not compatible with `customRenderer` — custom renderers do not support CSS injection'
}); });

Loading…
Cancel
Save