Merge pull request #390 from shikorism/moment-locale

JSバンドルからMomentを除去する
This commit is contained in:
shibafu 2020-06-06 16:32:48 +09:00 committed by GitHub
commit 57c6eff442
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 4 deletions

1
.gitignore vendored
View File

@ -5,6 +5,7 @@
/public/hot
/public/storage
/public/mix-manifest.json
/public/report.html
/storage/*.key
/vendor
/.idea

View File

@ -35,4 +35,4 @@ new Chart(graph.getContext('2d'), {
}]
}
}
});
});

11
webpack.mix.js vendored
View File

@ -25,9 +25,14 @@ mix.js('resources/assets/js/app.js', 'public/js')
'jquery': ['$', 'jQuery', 'window.jQuery']
})
.extract(['jquery', 'bootstrap'])
.extract(['chart.js', 'chartjs-color', 'color-name', 'moment'], 'public/js/vendor/chart')
.version();
.extract(['chart.js', 'chartjs-color', 'color-name', 'moment', 'cal-heatmap', 'd3'], 'public/js/vendor/chart')
.version()
.webpackConfig(webpack => ({
externals: {
moment: 'moment'
}
}));
if (process.argv.includes('-a')) {
mix.bundleAnalyzer({analyzerMode: 'static'});
mix.bundleAnalyzer({ analyzerMode: 'static' });
}