chore(*): use eval-source-map (#547)

This commit is contained in:
Nathan Bierema 2020-08-01 15:30:39 -04:00 committed by GitHub
parent 016a26c837
commit b1fce36a54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 8 deletions

View File

@ -5,7 +5,7 @@ var isProduction = process.env.NODE_ENV === 'production';
module.exports = { module.exports = {
mode: isProduction ? 'production' : 'development', mode: isProduction ? 'production' : 'development',
devtool: 'source-map', devtool: 'eval-source-map',
entry: [ entry: [
!isProduction && 'webpack-dev-server/client?http://localhost:3000', !isProduction && 'webpack-dev-server/client?http://localhost:3000',
!isProduction && 'webpack/hot/only-dev-server', !isProduction && 'webpack/hot/only-dev-server',

View File

@ -81,5 +81,5 @@ module.exports = (env = {}) => ({
devServer: { devServer: {
port: 3000 port: 3000
}, },
devtool: env.development ? 'eval' : 'source-map' devtool: env.development ? 'eval-source-map' : 'source-map'
}); });

View File

@ -10,7 +10,7 @@ var isProduction = process.env.NODE_ENV === 'production';
module.exports = { module.exports = {
mode: process.env.NODE_ENV || 'development', mode: process.env.NODE_ENV || 'development',
devtool: 'eval', devtool: 'eval-source-map',
entry: isProduction entry: isProduction
? ['./demo/src/js/index'] ? ['./demo/src/js/index']
: [ : [

View File

@ -3,14 +3,13 @@ const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin'); const CleanWebpackPlugin = require('clean-webpack-plugin');
const ExportFilesWebpackPlugin = require('export-files-webpack-plugin'); const ExportFilesWebpackPlugin = require('export-files-webpack-plugin');
const NyanProgressWebpackPlugin = require('nyan-progress-webpack-plugin');
const pkg = require('./package.json'); const pkg = require('./package.json');
const isProduction = process.env.NODE_ENV === 'production'; const isProduction = process.env.NODE_ENV === 'production';
module.exports = { module.exports = {
devtool: 'eval', devtool: 'eval-source-map',
entry: isProduction entry: isProduction
? ['./demo/src/js/index'] ? ['./demo/src/js/index']
: [ : [
@ -34,8 +33,7 @@ module.exports = {
'process.env': { 'process.env': {
NODE_ENV: JSON.stringify(process.env.NODE_ENV) NODE_ENV: JSON.stringify(process.env.NODE_ENV)
} }
}), })
new NyanProgressWebpackPlugin()
].concat( ].concat(
isProduction isProduction
? [ ? [

View File

@ -2,7 +2,7 @@ const path = require('path');
const webpack = require('webpack'); const webpack = require('webpack');
module.exports = { module.exports = {
devtool: 'eval-cheap-module-source-map', devtool: 'eval-source-map',
devServer: { devServer: {
contentBase: path.join(__dirname, 'dist'), contentBase: path.join(__dirname, 'dist'),
host: 'localhost', host: 'localhost',