diff options
Diffstat (limited to 'webpack.config.js')
-rw-r--r-- | webpack.config.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/webpack.config.js b/webpack.config.js index d7f0c83d8a..9a69c550f2 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,5 +1,6 @@ const fastGlob = require('fast-glob'); const wrapAnsi = require('wrap-ansi'); +const AddAssetPlugin = require('add-asset-webpack-plugin'); const CssMinimizerPlugin = require('css-minimizer-webpack-plugin'); const FixStyleOnlyEntriesPlugin = require('webpack-fix-style-only-entries'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); @@ -273,7 +274,7 @@ module.exports = { new MonacoWebpackPlugin({ filename: 'js/monaco-[name].worker.js', }), - new LicenseWebpackPlugin({ + isProduction ? new LicenseWebpackPlugin({ outputFilename: 'js/licenses.txt', perChunkOutput: false, addBanner: false, @@ -281,6 +282,9 @@ module.exports = { modulesDirectories: [ resolve(__dirname, 'node_modules'), ], + additionalModules: [ + '@primer/octicons', + ].map((name) => ({name, directory: resolve(__dirname, `node_modules/${name}`)})), renderLicenses: (modules) => { const line = '-'.repeat(80); return modules.map((module) => { @@ -294,7 +298,7 @@ module.exports = { warnings: false, errors: true, }, - }), + }) : new AddAssetPlugin('js/licenses.txt', `Licenses are disabled during development`), ], performance: { hints: false, |