Merge pull request #457 from shikorism/fix/source-map-in-dev

SourceMapが欲しい
This commit is contained in:
shibafu 2020-08-06 02:02:33 +09:00 committed by GitHub
commit 081dd8da28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

12
webpack.mix.js vendored
View File

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