Skip to content

Commit

Permalink
generate a manifest.json with our source entry points
Browse files Browse the repository at this point in the history
  • Loading branch information
tconkling committed Sep 5, 2018
1 parent 72e79fb commit e517b49
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
50 changes: 50 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"typescript-eslint-parser": "^18.0.0",
"webpack": "^4.17.2",
"webpack-cli": "^3.1.0",
"webpack-manifest-plugin": "^2.0.3",
"webpack-merge": "^4.1.4"
},
"dependencies": {
Expand Down
7 changes: 7 additions & 0 deletions webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const path = require('path');
const HardSourceWebpackPlugin = require('hard-source-webpack-plugin');
const Dotenv = require('dotenv-webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ManifestPlugin = require('webpack-manifest-plugin');

const packageJson = require('./package.json');
const vendorDependencies = Object.keys(packageJson['dependencies']);
Expand Down Expand Up @@ -94,5 +95,11 @@ module.exports = {

// Generate an index.html that includes our webpack bundles
new HtmlWebpackPlugin({template: 'src/index.html.tmpl', inject: false}),

// Generate a manifest.json file containing our entry point file names:
// https://github.com/danethurber/webpack-manifest-plugin#hooks-options
new ManifestPlugin({
filter: (item) => item.isInitial
}),
]
};

0 comments on commit e517b49

Please sign in to comment.