From 8e96fb45ed5ac734b650a6b34a65912a4b8c11b4 Mon Sep 17 00:00:00 2001 From: Peter Stuifzand Date: Mon, 16 Aug 2021 00:06:20 +0200 Subject: [PATCH] Only import nl locale for moment --- editor/src/editor.js | 1 + editor/webpack.config.js | 34 +++++++++++++++++++--------------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/editor/src/editor.js b/editor/src/editor.js index b21e17b..1a92dae 100644 --- a/editor/src/editor.js +++ b/editor/src/editor.js @@ -8,6 +8,7 @@ import qs from 'querystring' import $ from 'jquery'; import getCaretCoordinates from './caret-position' import moment from 'moment' +import "moment/locale/nl" // import mermaid from 'mermaid' // import {Network, parseDOTNetwork} from "vis-network/peer"; // import PrismJS from 'prismjs' diff --git a/editor/webpack.config.js b/editor/webpack.config.js index 0c790c8..7ee1a25 100644 --- a/editor/webpack.config.js +++ b/editor/webpack.config.js @@ -49,6 +49,10 @@ module.exports = env => { new webpack.EnvironmentPlugin({ DEBUG: false, NODE_DEBUG: false, + }), + new webpack.IgnorePlugin({ + resourceRegExp: /^\.\/locale$/, + contextRegExp: /moment$/, }) ], // @@ -59,21 +63,21 @@ module.exports = env => { // optimization: { usedExports: true, - // splitChunks: { - // cacheGroups: { - // commons: { - // test: /[\\/]node_modules[\\/]/, - // name: 'vendors', - // chunks: 'all' - // }, - // styles: { - // name: 'styles', - // test: /\.css$/, - // chunks: 'all', - // enforce: true, - // }, - // } - // } + splitChunks: { + cacheGroups: { + commons: { + test: /[\\/]node_modules[\\/]/, + name: 'vendors', + chunks: 'all' + }, + styles: { + name: 'styles', + test: /\.css$/, + chunks: 'all', + enforce: true, + }, + } + } } } };