webpack.config.js 534 B

12345678910111213141516171819
  1. const webpack = require('webpack')
  2. const HtmlWebpackPlugin = require('html-webpack-plugin');
  3. module.exports = {
  4. plugins: [
  5. new HtmlWebpackPlugin({
  6. title: 'ipfs',
  7. }),
  8. // > Uncaught (in promise) ReferenceError: process is not defined
  9. // https://github.com/ipfs/js-ipfs/blob/dc041aa3de789290bfc5c1c0b8c2878d8c79186a/examples/browser-webpack/webpack.config.js#L35
  10. new webpack.ProvidePlugin({
  11. Buffer: ['buffer', 'Buffer'],
  12. process: 'process/browser'
  13. })
  14. ],
  15. output: {
  16. clean: true,
  17. },
  18. }