1.0.5 • Published 8 years ago
packages-versions-webpack-plugin v1.0.5
packages-versions-webpack-plugin
this package create a text file that contain the correct dependencies of the project
this plugin create a
version.txtfile in theentryfolder that contain the current packages that install on the project
install this plugin
npm install --save-dev packages-versions-webpack-plugin- in the
webpack.config.js
var PackagesVersionsPlugin = require('packages-versions-webpack-plugin');- in the plugin section
var webpackConfig = {
...
plugins: [
...
new PackagesVersionsPlugin(),
...
],
...
};using this plugin in the code
this plugin can be using in the code using raw-loader like so
console.info(require('!!raw-loader!./versions.txt'));notice that you need to install raw-loader in order to use this snippet
version releases
1.0.5
- create the
versions.txtonly on the creating of the plugin (a.k.a. first webpack build)
1.0.4
- bug fix, change
pathtopath2VersionTxt
1.0.3
- add support to Angular2, if there is an
entry.appthen put theversion.txtthere.
1.0.2
- use try and catch in the creating of the
version.txtin order to dismissnpm lserror like peer dependencies - update README.md file