
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
@aller/svelte-components
Advanced tools
We need a project that can host our svelte components. We would like to server side render the components, and this is mostly just testing what the best approach to doing that would be
We need a project that can host our svelte components. We would like to server side render the components, and this is mostly just testing what the best approach to doing that would be
yarn
yarn dev
localhost:3000/render/example
So far this works by making webpack create three different bundles. One for the server, one for modern browsers and one for legacy browsers.
The server will respond with styled markup and a script tag that will download the bundle. Once the bundle is downloaded, the component will hydrate and become interactive
As a result of the pattern above, each svelte components needs to be placed within it's own folder in /src
. The components folder should contain a .svelte and .js file with the same name as the component folder. The .js file's target also needs to inlude the name of the component target: document.getElementById("svelte-app-NAME_OF_COMPONENT")
. Copy /src/example
for a starting point
We create two differende bundles for the client because we would like to avoid serving a heavily transpiled and polyfilled bundle to browser's that does not need it. We include the modern bundle with a script type="module"
tag and the legacy bundle with a script nomodule
tag. Modern browsers that support ES2015+ will download the modern bundle and ignore the legacy bundle. Legacy browsers that does not support type="module" will download and execute the legacy bundle. Some might download the modern bundle as well, but not execute it. More information about this approach
FAQs
Svelte components
The npm package @aller/svelte-components receives a total of 8 weekly downloads. As such, @aller/svelte-components popularity was classified as not popular.
We found that @aller/svelte-components demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 11 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.