Skip to content

Unable to get rollup plugin to work with sprinkles in a monorepo setup #774

Answered by ericmatthys
ericmatthys asked this question in Q&A
Discussion options

You must be logged in to vote

Part of this issue was fixed by a TypeScript configuration change, not using paths to resolve packages in the monorepo. This means that vanilla-extract doesn't see the .css.ts imports in external packages. Then there was an issue with importing css in external packages, which was solved by passing an esbuild plugin to ignore css imports.

esbuildOptions: {
  plugins: [
    {
    name: 'empty-external-css-imports',
      setup(build) {
        build.onLoad({ filter: /\.css$/ }, () => ({ contents: '' }));
      },
    },
  ],
},

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@tannera
Comment options

@ericmatthys
Comment options

Answer selected by ericmatthys
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants