aiji42/remix-esbuild-override

Issues with style imports of vanilla-extract for route

silverAndroid opened this issue · 1 comments

I'm trying to import a style that was created using vanilla-extract for a page but it doesn't seem to be working. The component style import works properly which leads me to believe there's some edge case for pages that need to be solved?

Minimal repro: https://codesandbox.io/p/github/silverAndroid/remix-esbuild-override/test?file=%2Fexamples%2Fvanilla-extract%2Fapp%2Froutes%2Findex.tsx&selection=%5B%7B%22endColumn%22%3A7%2C%22endLineNumber%22%3A9%2C%22startColumn%22%3A7%2C%22startLineNumber%22%3A9%7D%5D
Stacktrace:

Error: Styles were unable to be assigned to a file. This is generally caused by one of the following:

- You may have created styles outside of a '.css.ts' context
- You may have incorrect configuration. See https://vanilla-extract.style/documentation/setup
    at Object.getFileScope (/project/home/silverandroid/workspace/examples/vanilla-extract/node_modules/@vanilla-extract/css/fileScope/dist/vanilla-extract-css-fileScope.cjs.dev.js:33:11)
    at generateIdentifier (/project/home/silverandroid/workspace/examples/vanilla-extract/node_modules/@vanilla-extract/css/dist/vanilla-extract-css.cjs.dev.js:176:49)
    at composedStyle (/project/home/silverandroid/workspace/examples/vanilla-extract/node_modules/@vanilla-extract/css/dist/vanilla-extract-css.cjs.dev.js:349:19)
    at style (/project/home/silverandroid/workspace/examples/vanilla-extract/node_modules/@vanilla-extract/css/dist/vanilla-extract-css.cjs.dev.js:396:12)
    at Object.<anonymous> (/project/home/silverandroid/workspace/examples/vanilla-extract/app/routes/index.css.ts:5:26)
    at Module._compile (node:internal/modules/cjs/loader:1126:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
    at Module.load (node:internal/modules/cjs/loader:1004:32)
    at Function.Module._load (node:internal/modules/cjs/loader:839:12)
    at Module.require (node:internal/modules/cjs/loader:1028:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at /project/home/silverandroid/workspace/examples/vanilla-extract/node_modules/@remix-run/serve/index.js:43:17
    at Layer.handle [as handle_request] (/project/home/silverandroid/workspace/examples/vanilla-extract/node_modules/express/lib/router/layer.js:95:5)
    at next (/project/home/silverandroid/workspace/examples/vanilla-extract/node_modules/express/lib/router/route.js:137:13)
    at next (/project/home/silverandroid/workspace/examples/vanilla-extract/node_modules/express/lib/router/route.js:131:14)
    at next (/project/home/silverandroid/workspace/examples/vanilla-extract/node_modules/express/lib/router/route.js:131:14)

Sorry, vanilla-extract is no longer supported by this repository.