reveal.js icon indicating copy to clipboard operation
reveal.js copied to clipboard

Can't define custom theme with feature/vite branch

Open kruton opened this issue 11 months ago • 1 comments

Since exports was added to package.json, you can't define your own theme outside of the reveal.js package. For instance, using the mixins as they're specified in the themes files:

@use "reveal.js/css/theme/template/mixins" as mixins;

results in this error:

[plugin:vite:css] [sass] Missing "./css/theme/template/mixins" specifier in "reveal.js" package
   ╷
12 │ @use "reveal.js/css/theme/template/mixins" as mixins;
   │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
  src/reveal-theme.scss 12:1  @use
  src/index.scss 2:1          root stylesheet

kruton avatar Jan 16 '25 20:01 kruton

You can workaround this by using a relative path to reveal.js:

@use "../node_module/reveal.js/css/theme/template/mixins" as mixins;

kruton avatar Jan 16 '25 20:01 kruton