mirror of https://github.com/sveltejs/svelte
feat: error on imports to `svelte/internal/*` (#11632)
* feat: error on imports to `svelte/internal/*` closes #11622 * regenerate * also error on svelte/internalpull/11617/head
parent
13ce43a0a8
commit
4bedd0e4fb
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"svelte": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
feat: error on imports to `svelte/internal/*`
|
@ -0,0 +1,9 @@
|
|||||||
|
import { test } from '../../test';
|
||||||
|
|
||||||
|
export default test({
|
||||||
|
error: {
|
||||||
|
code: 'import_svelte_internal_forbidden',
|
||||||
|
message:
|
||||||
|
"Imports of `svelte/internal/*` are forbidden. It contains private runtime code which is subject to change without notice. If you're importing from `svelte/internal/*` to work around a limitation of Svelte, please open an issue at https://github.com/sveltejs/svelte and explain your use case"
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,5 @@
|
|||||||
|
<svelte:options runes={true} />
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { something } from 'svelte/internal/client';
|
||||||
|
</script>
|
@ -0,0 +1 @@
|
|||||||
|
import { something } from 'svelte/internal/server';
|
Loading…
Reference in new issue