rollup-plugin-webpack-stats
Advanced tools
Comparing version 1.0.0-beta.1 to 1.0.0-beta.2
@@ -1,3 +0,20 @@ | ||
import { webpackStats } from './plugin'; | ||
export default webpackStats; | ||
import { Plugin, OutputOptions } from 'rollup'; | ||
import type { BundleTransformOptions } from './transform'; | ||
export { bundleToWebpackStats } from './transform'; | ||
interface WebpackStatsOptions extends BundleTransformOptions { | ||
/** | ||
* JSON file output fileName | ||
* default: webpack-stats.json | ||
*/ | ||
fileName?: string; | ||
/** | ||
* Exclude matching assets | ||
*/ | ||
excludeAssets?: BundleTransformOptions['excludeAssets']; | ||
/** | ||
* Exclude matching modules | ||
*/ | ||
excludeModules?: BundleTransformOptions['excludeModules']; | ||
} | ||
type WebpackStatsOptionsOrBuilder = WebpackStatsOptions | ((outputOptions: OutputOptions) => WebpackStatsOptions); | ||
export declare const webpackStats: (options?: WebpackStatsOptionsOrBuilder) => Plugin; |
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
var path = require('path'); | ||
@@ -146,3 +144,3 @@ var crypto = require('crypto'); | ||
exports.bundleToWebpackStats = bundleToWebpackStats; | ||
exports.default = webpackStats; | ||
exports.webpackStats = webpackStats; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "rollup-plugin-webpack-stats", | ||
"version": "1.0.0-beta.1", | ||
"version": "1.0.0-beta.2", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -29,8 +29,8 @@ # rollup-plugin-webpack-stats | ||
// rollup.config.js | ||
import webpackStatsPlugin from 'rollup-plugin-webpack-stats'; | ||
const { webpackStats } = require('rollup-plugin-webpack-stats'); | ||
export default { | ||
module.exports = { | ||
plugins: [ | ||
// add it as the last plugin | ||
webpackStatsPlugin(), | ||
webpackStats(), | ||
], | ||
@@ -43,3 +43,3 @@ }; | ||
import { defineConfig } from 'vite'; | ||
import webpackStatsPlugin from 'rollup-plugin-webpack-stats'; | ||
import { webpackStats } from 'rollup-plugin-webpack-stats'; | ||
@@ -49,3 +49,3 @@ export default defineConfig((env) => ({ | ||
// Output webpack-stats.json file | ||
webpackStatsPlugin(), | ||
webpackStats(), | ||
], | ||
@@ -66,3 +66,3 @@ })); | ||
// rollup.config.js | ||
import webpackStatsPlugin from 'rollup-plugin-webpack-stats'; | ||
const { webpackStats } = require('rollup-plugin-webpack-stats'); | ||
@@ -72,3 +72,3 @@ module.exports = { | ||
// add it as the last plugin | ||
webpackStatsPlugin({ | ||
webpackStats({ | ||
filename: 'artifacts/stats.json, | ||
@@ -83,8 +83,8 @@ }), | ||
// rollup.config.js | ||
import webpackStatsPlugin from 'rollup-plugin-webpack-stats'; | ||
const { webpackStats } = require('rollup-plugin-webpack-stats'); | ||
export default { | ||
module.exports = { | ||
plugins: [ | ||
// add it as the last plugin | ||
webpackStatsPlugin({ | ||
webpackStats({ | ||
excludeAssets: /\.map$/, | ||
@@ -101,3 +101,3 @@ }), | ||
import legacy from '@vitejs/plugin-legacy'; | ||
import webpackStatsPlugin from 'rollup-plugin-webpack-stats'; | ||
import { webpackStats } from 'rollup-plugin-webpack-stats'; | ||
@@ -113,3 +113,3 @@ export default defineConfig((env) => ({ | ||
// an additional output, that duplicates the plugins configured here | ||
webpackStatsPlugin((options) => { | ||
webpackStats((options) => { | ||
const isLegacy = options.format === 'system'; | ||
@@ -116,0 +116,0 @@ return { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18489
8
226