SourceMapが欲しい

This commit is contained in:
shibafu 2020-08-06 01:05:33 +09:00
parent 54e112fa57
commit 82bb10ae24

17
webpack.mix.js vendored
View File

@ -1,5 +1,6 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
const mix = require('laravel-mix');
require('laravel-mix-bundle-analyzer')
require('laravel-mix-bundle-analyzer');
/*
|--------------------------------------------------------------------------
@ -22,17 +23,23 @@ mix.ts('resources/assets/js/app.ts', 'public/js')
.ts('resources/assets/js/checkin.ts', 'public/js')
.sass('resources/assets/sass/app.scss', 'public/css')
.autoload({
'jquery': ['$', 'jQuery', 'window.jQuery']
jquery: ['$', 'jQuery', 'window.jQuery'],
})
.extract(['jquery', 'bootstrap'])
.extract(['chart.js', 'chartjs-color', 'color-name', 'moment', 'cal-heatmap', 'd3'], 'public/js/vendor/chart')
.version()
.webpackConfig(webpack => ({
.webpackConfig((_webpack) => ({
externals: {
moment: 'moment'
}
moment: 'moment',
},
}));
if (process.argv.includes('-a')) {
mix.bundleAnalyzer({ analyzerMode: 'static' });
}
if (!mix.inProduction()) {
mix.webpackConfig({
devtool: 'source-map',
});
}