Merge pull request #230 from lion-man44/remove/choices/min-map/lion

The source map is unnecessary in the production
This commit is contained in:
Josh Johnson 2017-08-18 08:43:24 +01:00 committed by GitHub
commit 02f7bdcd2f
5 changed files with 341 additions and 304 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
{"version":3,"file":"choices.min.js","sources":[],"mappings":";;;","sourceRoot":""}

View file

@ -1,12 +1,12 @@
var path = require('path'); const path = require('path');
var pkg = require('./package.json'); const pkg = require('./package.json');
var webpack = require('webpack'); const webpack = require('webpack');
var wrapperPlugin = require('wrapper-webpack-plugin'); const wrapperPlugin = require('wrapper-webpack-plugin');
var banner = `/*! ${ pkg.name } v${ pkg.version } | (c) ${ new Date().getFullYear() } ${ pkg.author } | ${ pkg.homepage } */ \n`; const banner = `/*! ${ pkg.name } v${ pkg.version } | (c) ${ new Date().getFullYear() } ${ pkg.author } | ${ pkg.homepage } */ \n`;
var minimize = process.argv.indexOf('--minimize') !== -1; const minimize = process.argv.includes('--minimize');
var config = { const config = {
devtool: 'cheap-module-source-map', devtool: minimize ? false : 'cheap-module-source-map',
entry: [ entry: [
'./assets/scripts/src/choices' './assets/scripts/src/choices'
], ],