1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-03 08:28:31 +00:00

Dependency Maintenance

* Start using the [pnpm](https://pnpm.io/) package manager rather than npm.
* Replace `node-sass` with `sass`.
* Update versions of many dependencies
* Didn't yet update webpack to v5, since that'll be a mess.
* Clean some old build scripts out of package.json
This commit is contained in:
SirStendec 2021-11-06 20:12:55 -04:00
parent 76b72b86c8
commit 1c3e73e143
8 changed files with 6220 additions and 11504 deletions

View file

@ -4,7 +4,7 @@ const common = require('./webpack.web.common.js');
const CopyPlugin = require('copy-webpack-plugin');
const TerserPlugin = require('terser-webpack-plugin');
const ManifestPlugin = require('webpack-manifest-plugin');
const { WebpackManifestPlugin } = require('webpack-manifest-plugin');
const {CleanWebpackPlugin} = require('clean-webpack-plugin');
const Terser = require('terser');
@ -15,6 +15,12 @@ const commit_hash = require('child_process').execSync('git rev-parse HEAD').toSt
/* global module Buffer */
const minifier = content => {
const text = content.toString('utf8');
const minified = Terser.minify(text);
return (minified && minified.code) ? Buffer.from(minified.code) : content;
};
module.exports = merge(common, {
mode: 'production',
devtool: 'source-map',
@ -41,14 +47,10 @@ module.exports = merge(common, {
{
from: './src/entry.js',
to: 'script.min.js',
transform: content => {
const text = content.toString('utf8');
const minified = Terser.minify(text);
return (minified && minified.code) ? Buffer.from(minified.code) : content;
}
transform: minifier
}
]),
new ManifestPlugin({
new WebpackManifestPlugin({
publicPath: '',
map: data => {
if ( data.name.endsWith('.scss') )