![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Auto-Inject polyfill from https://cdnjs.cloudflare.com/polyfill/
DON'T USE THIS MODULE, POLYFILL.IO HAS BEEN REPORTED INJECTING SOME MALICIOUS CODE. TEMPORARY WE MOVE THE URL TO CLOUDFLARE'S MIRROR.
https://sansec.io/research/polyfill-supply-chain-attack
https://www.theregister.com/2024/06/25/polyfillio_china_crisis/
https://www.scmagazine.com/brief/over-100k-sites-hit-by-polyfill-io-supply-chain-attack
See the detailed feature explanation here: #58 (comment)
nupolyon
dependency to your projectnpx nuxi@latest module add nupolyon
nupolyon
to the modules
section of nuxt.config.ts
export default defineNuxtConfig({
modules: [
'nupolyon'
]
})
That's it! You can now use Nupolyon in your Nuxt app ✨
export default defineNuxtConfig({
modules: [
'nupolyon'
],
nupolyon: {
// change host
host: 'http://my-own-cdn.com/polyfill.min.js'
// or enable self-host mode
host: 'selfhost'
// customize browserslist's target
target: 'defaults'
},
})
# Install dependencies
npm install
# Generate type stubs
npm run dev:prepare
# Develop with the playground
npm run dev
# Build the playground
npm run dev:build
# Run ESLint
npm run lint
# Run Vitest
npm run test
npm run test:watch
# Release new version
npm run release
This project published under MIT License, see LICENSE for more details.
FAQs
Auto-Inject polyfill
The npm package nupolyon receives a total of 128 weekly downloads. As such, nupolyon popularity was classified as not popular.
We found that nupolyon demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.