moment自体をexternalsで追い出す

This commit is contained in:
hina 2020-06-06 15:38:40 +09:00
parent aae9e0c502
commit 5d16c3b680
No known key found for this signature in database
GPG Key ID: B666B2A137443F76
3 changed files with 3 additions and 19 deletions

View File

@ -23,7 +23,6 @@
"laravel-mix": "^4.0.0",
"laravel-mix-bundle-analyzer": "^1.0.2",
"lint-staged": "^8.1.5",
"moment-locales-webpack-plugin": "^1.2.0",
"open-iconic": "^1.1.1",
"popper.js": "^1.14.7",
"resolve-url-loader": "^2.3.1",

9
webpack.mix.js vendored
View File

@ -1,6 +1,5 @@
const mix = require('laravel-mix');
require('laravel-mix-bundle-analyzer')
const MomentLocalesPlugin = require('moment-locales-webpack-plugin');
/*
|--------------------------------------------------------------------------
@ -29,11 +28,9 @@ mix.js('resources/assets/js/app.js', 'public/js')
.extract(['chart.js', 'chartjs-color', 'color-name', 'moment', 'cal-heatmap', 'd3'], 'public/js/vendor/chart')
.version()
.webpackConfig(webpack => ({
plugins: [
new MomentLocalesPlugin({
localesToKeep: ['ja']
})
]
externals: {
moment: 'moment'
}
}));
if (process.argv.includes('-a')) {

View File

@ -4589,11 +4589,6 @@ lodash.defaults@^4.0.0:
resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c"
integrity sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=
lodash.difference@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.difference/-/lodash.difference-4.5.0.tgz#9ccb4e505d486b91651345772885a2df27fd017c"
integrity sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw=
lodash.isarguments@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a"
@ -5007,13 +5002,6 @@ mkdirp@^0.5.1, mkdirp@~0.5.1:
dependencies:
minimist "0.0.8"
moment-locales-webpack-plugin@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/moment-locales-webpack-plugin/-/moment-locales-webpack-plugin-1.2.0.tgz#9af83876a44053706b868ceece5119584d10d7aa"
integrity sha512-QAi5v0OlPUP7GXviKMtxnpBAo8WmTHrUNN7iciAhNOEAd9evCOvuN0g1N7ThIg3q11GLCkjY1zQ2saRcf/43nQ==
dependencies:
lodash.difference "^4.5.0"
moment@^2.10.2:
version "2.24.0"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b"