File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @vanilla-extract/css ' : patch
3+ ---
4+
5+ Improve missing filescope error
Original file line number Diff line number Diff line change 1+ import dedent from 'dedent' ;
12import { onEndFileScope } from './adapter' ;
23import type { FileScope } from './types' ;
34
@@ -22,7 +23,12 @@ export function endFileScope() {
2223export function getFileScope ( ) : FileScope {
2324 if ( fileScopes . length === 0 ) {
2425 throw new Error (
25- 'New styles cannot be registered dynamically after initial boot. This is to ensure that styles are statically extractible.' ,
26+ dedent `
27+ Styles were unable to be assigned to a file. This is generally caused by one of the following:
28+
29+ - You may have created styles outside of a '.css.ts' context
30+ - You may have incorrect configuration. See https://vanilla-extract.style/documentation/setup
31+ ` ,
2632 ) ;
2733 }
2834
You can’t perform that action at this time.
0 commit comments