DefinitelyTyped/types/sw-precache-webpack-plugin/sw-precache-webpack-plugin-tests.ts
JounQin e8849415f2 feat: add declarations for sw-precache-webpack-plugin (#25541)
* feat: add declarations for sw-precache-webpack-plugin

* override type of sw-precache option `importScripts`
2018-05-07 09:18:22 -07:00

37 lines
632 B
TypeScript

import { Configuration } from 'webpack';
import * as SwPrecacheWebpackPlugin from 'sw-precache-webpack-plugin';
let config: Configuration = {
plugins: [new SwPrecacheWebpackPlugin()]
};
config = {
plugins: [
new SwPrecacheWebpackPlugin({
filename: ''
})
]
};
config = {
plugins: [
new SwPrecacheWebpackPlugin({
cacheId: ''
})
]
};
config = {
plugins: [
new SwPrecacheWebpackPlugin({
importScripts: [
{
chunkName: ''
}
]
})
]
};
export default config;