diff options
Diffstat (limited to 'webpack.config.d/moment.js')
-rw-r--r-- | webpack.config.d/moment.js | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/webpack.config.d/moment.js b/webpack.config.d/moment.js index e8db2ea0..94d91914 100644 --- a/webpack.config.d/moment.js +++ b/webpack.config.d/moment.js @@ -1,4 +1,12 @@ -config.plugins.push(new webpack.ProvidePlugin({ - moment: "moment", - "window.moment": "moment" -})); +;(function() { + const webpack = require('webpack') + try { + const moment = require("moment"); + + config.plugins.push(new webpack.ProvidePlugin({ + moment: "moment", + "window.moment": "moment" + })); + } catch (e) { + } +})(); |