Guest User

Untitled

a guest
Mar 7th, 2021
1,117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const path = require("path");
  2.  
  3. module.exports = {
  4.   webpack: (config, webpack) => {
  5.     // Note: we provide webpack above so you should not `require` it
  6.     // Perform customizations to webpack config
  7.     // Important: return the modified config
  8.     const regexToMatch = /\.m?js$/;
  9.     config.module.rules = config.module.rules.map((rule) => {
  10.       if (rule.test.toString() == regexToMatch.toString()) {
  11.         delete rule.exclude;
  12.       }
  13.       return rule;
  14.     });
  15.  
  16.     return config;
  17.   },
  18. };
  19.  
Advertisement
Add Comment
Please, Sign In to add comment