Skip to content

WebPack plugin that analyze .vue files which are loaded by vue-loader

License

Notifications You must be signed in to change notification settings

indiegogo/vue-sfc-analyzer-webpack-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VueSFCAnalyzerWebpackPlugin

CircleCI npm

WebPack plugin that analyze Vue SFC .vue files which are loaded by vue-loader

image

Requirements

  • Webpack 4
  • vue-loader 15+

Installation

$ npm install -D vue-sfc-analyzer-webpack-plugin

or with Yarn,

$ yarn add -D vue-sfc-analyzer-webpack-plugin

Then configure your webpack config like:

const path = require("path");
const VueSFCAnalyzerWebpackPlugin = require("vue-sfc-analyzer-webpack-plugin");

...

config.plugins.push(new VueSFCAnalyzerWebpackPlugin({
  showSummary: true,
  statsFilename: path.resolve(__dirname, "../analysis/vue_sfc_stats.json")
}));

...

When you run a production build (production mode on Webpack 4), ModuleConcatenationPlugin may not calculate sizes for <script> and <template>. Then you can disable the plugin with:

module.exports = {
  ...
  optimization: {
    concatenateModules: false
  }
  ...
}

Option

new VueSFCAnalyzerWebpackPlugin(options: VueSFCAnalyzerWebpackPluginOption)
Name Type Default Description
showSummary boolean true Show summary after finishing Webpack build
statsFileName string path.resolve(process.cwd(), "./vue_sfc_stats.json") Absolute path to dump a stats file

LICENSE

MIT

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

About

WebPack plugin that analyze .vue files which are loaded by vue-loader

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published