reveal.js
reveal.js copied to clipboard
Can't define custom theme with feature/vite branch
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
You can workaround this by using a relative path to reveal.js:
@use "../node_module/reveal.js/css/theme/template/mixins" as mixins;