https://github.com/thepassle/cdn-proxy-plugin
https://github.com/thepassle/cdn-proxy-plugin
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/thepassle/cdn-proxy-plugin
- Owner: thepassle
- Created: 2024-03-19T15:35:28.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-03-19T15:52:33.000Z (11 months ago)
- Last Synced: 2024-11-12T21:45:56.416Z (3 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@pgfg/cdn-proxy-plugin
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cdn proxy plugin
`web-dev-server.config.js`:
```js
import { cdnProxy } from '@pgfg/cdn-proxy-plugin';export default {
plugins: [
cdnProxy({
cdn: 'cdn.foo.com',
// or:
// cdn: 'staging.cdn.foo.com',
packages: {
'foo-web': '1.0.0',
}
})
]
};
```Rewrites bare module specifiers (e.g.: `import "foo-web"`) to CDN urls (e.g.: `import "https://cdn.foo.com/foo-web/1.0.0/es-modules/file.js"`)