Releases: Elderjs/elderjs
Releases · Elderjs/elderjs
v1.2.3
v1.2.2
v1.2.1
Peg svelte at a version that doesn't conflict with preprocessors.
v1.2.0
Testing
The testing suite is now windows compatible. This was a major major undertaking but having rewritten almost 200 tests to accommodate it, we're glad it is available.
CSS: Inline or External File
There are now 4 css modes.
file
: (default) All of the CSS from Svelte components and imported into Svelte components is written to a file and included in the head.lazy
: All of the CSS from Svelte components and imported into Svelte components is written to a file and included in the head but is lazily loaded. This is perfect to use with the Elder.js critical path plugin.inline
One where all CSS a component depends on will be added to the head. This is how Elder.js started so this is the default. This is a great option for serverless rendering.none
no css handling.
The inline
option seems easy but is far from trivial. By default Svelte's compiler only gives you the "truthy" styles unless they are wrapped in :global(.foo)
. To do this Elder.js runs a special rollup plugin to all of the dependencies of a file, gather the css from those files, merge the source maps, and add it as a separate export to the CJS file that is generated.
Features:
- can now write css to an external file. Simply add
css: "file"
to yourelder.config.js
- Allows for importing of css in svelte files.
- consolidates all elderjs output into
/public/_elderjs
- Now properly gathers all dependent css for a component.
Fixes:
- file naming issues
- css not getting updated in dev mode
- css order is preserved.
- CSS not catching all dependencies.
Breaking:
- Split components during rollup needed to go. the complexity was too much.
- consolidates all elderjs output into
/public/_elderjs
- CSS used to be written to the head by default. The default going forward is
file
.