DefinitelyTyped/types/assets-webpack-plugin/assets-webpack-plugin-tests.ts

26 lines
670 B
TypeScript

import * as webpack from 'webpack';
import AssetsPlugin = require('assets-webpack-plugin');
const config: webpack.Configuration = {
plugins: [
new AssetsPlugin(),
new AssetsPlugin({
filename: 'assets.json'
}),
new AssetsPlugin({
filename: 'assets.json',
fullPath: false,
includeManifest: true,
path: '/foo/bar',
prettyPrint: true,
processOutput: (assets) => (
'window.assets = ' + JSON.stringify(assets)
),
update: true,
metadata: {
meta: 'data'
},
})
]
};