moment.js 423 B

12345678910111213141516
  1. ;(function() {
  2. const webpack = require('webpack')
  3. try {
  4. const moment = require("moment");
  5. config.plugins.push(new webpack.IgnorePlugin({
  6. resourceRegExp: /^\.\/locale$/,
  7. contextRegExp: /moment$/,
  8. }));
  9. config.plugins.push(new webpack.ProvidePlugin({
  10. moment: "moment",
  11. "window.moment": "moment"
  12. }));
  13. } catch (e) {
  14. }
  15. })();