Remove Node polyfills

pull/149/head
MattIPv4 2020-06-05 20:32:13 +01:00
parent 3c3161e924
commit 35962bd05e
2 changed files with 4 additions and 5 deletions

View File

@ -148,7 +148,7 @@ THE SOFTWARE.
const contents = this.tarContents(); const contents = this.tarContents();
// Convert it to base64 string // Convert it to base64 string
const b64 = Buffer.from(contents).toString('base64'); const b64 = btoa(String.fromCharCode(...contents));
return `echo '${b64}' | base64 --decode > ${this.nginxDir}/${this.tarName}`; return `echo '${b64}' | base64 --decode > ${this.nginxDir}/${this.tarName}`;
}, },
setupCopy() { setupCopy() {

View File

@ -32,13 +32,12 @@ const DuplicatePackageCheckerPlugin = require('duplicate-package-checker-webpack
module.exports = { module.exports = {
publicPath: './', publicPath: './',
outputDir: 'dist', outputDir: 'dist',
filenameHashing: false, filenameHashing: false, // Don't hash the output, so we can embed on the DigitalOcean Community
productionSourceMap: false, productionSourceMap: false,
configureWebpack: { configureWebpack: {
node: false, // Disable Node.js polyfills (Buffer etc.) -- This will be default in Webpack 5
plugins: [ plugins: [
new LimitChunkCountPlugin({ new LimitChunkCountPlugin({ maxChunks: 1 }), // Generate a single CSS & JS file for easy embedding
maxChunks: 1,
}),
process.argv.includes('--analyze') && new BundleAnalyzerPlugin(), process.argv.includes('--analyze') && new BundleAnalyzerPlugin(),
process.argv.includes('--analyze') && new DuplicatePackageCheckerPlugin(), process.argv.includes('--analyze') && new DuplicatePackageCheckerPlugin(),
].filter(x => !!x), ].filter(x => !!x),