v0.1.1
esbuild plugin for Deno that resolves HTTP/HTTPS and npm imports using its cache system
Attributes
Includes Deno configuration
Repository
Current version released
3 years ago
Dependencies
deno.land/x
esbuild-cache-plugin for Deno
An esbuild plugin to cache HTTP/HTTPS imports for Deno.
Example
import esbuild from 'esbuild';
import esbuildCachePlugin from 'esbuild-cache-plugin';
await esbuild.build([
entryPoints: ['app.js'],
bundle: true,
outfile: 'out.js',
plugins: [
esbuildCachePlugin({
directory: cachePath,
rules: [
{
test: /\.css$/,
loader: 'css'
}
]
}),
],
]);Options
interface Options {
directory?: string;
rules?: [{
test: RegExp;
loader: Loader | string;
}];
}directory: location where cache files are createdrules: Rules for loader selection based on file nametest:RegExpobject to test file nameloadera loader used to load file (default: esbuild default)