mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-02-07 07:00:48 +03:00
Update webpack for all packages
This commit is contained in:
parent
e2f9bf52b5
commit
da72f6778a
|
@ -6,14 +6,14 @@
|
|||
"scripts": {
|
||||
"clean": "rimraf lib dist",
|
||||
"lint": "eslint src",
|
||||
"build": "npm run build:lib && npm run build:umd && npm run build:umd:min",
|
||||
"build:lib": "babel src --out-dir lib",
|
||||
"build:umd": "webpack src/index.js dist/d3tooltip.js --config webpack.config.development.js",
|
||||
"build:umd:min": "webpack src/index.js dist/d3tooltip.min.js --config webpack.config.production.js",
|
||||
"build": "babel src --out-dir lib",
|
||||
"build:umd": "webpack --progress --config webpack.config.umd.js",
|
||||
"build:umd:min": "webpack --env.minimize --progress --config webpack.config.umd.js",
|
||||
"version": "npm run build",
|
||||
"postversion": "git push && git push --tags && npm run clean",
|
||||
"prepare": "npm run clean && npm run build",
|
||||
"prepublishOnly": "npm run lint && npm run clean && npm run build"
|
||||
"prepublishOnly":
|
||||
"npm run lint && npm run clean && npm run build && npm run build:umd && npm run build:umd:min"
|
||||
},
|
||||
"files": [
|
||||
"lib",
|
||||
|
@ -35,10 +35,10 @@
|
|||
},
|
||||
"homepage": "https://github.com/reduxjs/redux-devtools",
|
||||
"devDependencies": {
|
||||
"babel-cli": "^6.3.15",
|
||||
"babel-core": "^6.1.20",
|
||||
"babel-cli": "^6.26.0",
|
||||
"babel-core": "^6.26.0",
|
||||
"babel-eslint": "^5.0.0-beta4",
|
||||
"babel-loader": "^6.2.0",
|
||||
"babel-loader": "^7.1.5",
|
||||
"babel-preset-es2015-loose": "^6.1.3",
|
||||
"babel-preset-react": "^6.3.13",
|
||||
"babel-preset-stage-0": "^6.3.13",
|
||||
|
@ -46,7 +46,8 @@
|
|||
"eslint-config-airbnb": "0.0.6",
|
||||
"eslint-plugin-react": "^3.6.3",
|
||||
"rimraf": "^2.3.4",
|
||||
"webpack": "^1.9.6"
|
||||
"webpack": "^4.27.1",
|
||||
"webpack-cli": "^3.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"ramda": "^0.17.1"
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
module: {
|
||||
loaders: [
|
||||
{ test: /\.js$/, loaders: ['babel-loader'], exclude: /node_modules/ }
|
||||
]
|
||||
},
|
||||
output: {
|
||||
library: 'd3tooltip',
|
||||
libraryTarget: 'umd'
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['', '.js']
|
||||
}
|
||||
};
|
|
@ -1,14 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
var webpack = require('webpack');
|
||||
var baseConfig = require('./webpack.config.base');
|
||||
|
||||
var config = Object.create(baseConfig);
|
||||
config.plugins = [
|
||||
new webpack.optimize.OccurenceOrderPlugin(),
|
||||
new webpack.DefinePlugin({
|
||||
'process.env.NODE_ENV': JSON.stringify('development')
|
||||
})
|
||||
];
|
||||
|
||||
module.exports = config;
|
|
@ -1,20 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
var webpack = require('webpack');
|
||||
var baseConfig = require('./webpack.config.base');
|
||||
|
||||
var config = Object.create(baseConfig);
|
||||
config.plugins = [
|
||||
new webpack.optimize.OccurenceOrderPlugin(),
|
||||
new webpack.DefinePlugin({
|
||||
'process.env.NODE_ENV': JSON.stringify('production')
|
||||
}),
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
compressor: {
|
||||
screw_ie8: true,
|
||||
warnings: false
|
||||
}
|
||||
})
|
||||
];
|
||||
|
||||
module.exports = config;
|
31
packages/d3tooltip/webpack.config.umd.js
Normal file
31
packages/d3tooltip/webpack.config.umd.js
Normal file
|
@ -0,0 +1,31 @@
|
|||
const path = require('path');
|
||||
|
||||
module.exports = (env = {}) => (
|
||||
{
|
||||
mode: 'production',
|
||||
entry: {
|
||||
app: ['./src/index.js']
|
||||
},
|
||||
output: {
|
||||
library: 'd3tooltip',
|
||||
libraryTarget: 'umd',
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
filename: env.minimize ? 'd3tooltip.min.js' : 'd3tooltip.js'
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.js$/,
|
||||
loader: 'babel-loader',
|
||||
exclude: /node_modules/
|
||||
}
|
||||
]
|
||||
},
|
||||
optimization: {
|
||||
minimize: !!env.minimize
|
||||
},
|
||||
performance: {
|
||||
hints: false
|
||||
}
|
||||
}
|
||||
);
|
|
@ -6,12 +6,13 @@
|
|||
"scripts": {
|
||||
"clean": "rimraf lib dist",
|
||||
"build": "babel src --out-dir lib",
|
||||
"build:umd": "webpack src/index.js dist/map2tree.js && NODE_ENV=production webpack src/index.js dist/map2tree.min.js",
|
||||
"build:umd": "webpack --progress --config webpack.config.umd.js",
|
||||
"build:umd:min": "webpack --env.minimize --progress --config webpack.config.umd.js",
|
||||
"lint": "eslint src test",
|
||||
"test": "jest",
|
||||
"check": "npm run lint && npm run test",
|
||||
"prepare": "npm run build && npm run build:umd",
|
||||
"prepublishOnly": "npm run check && npm run clean && npm run build && npm run build:umd"
|
||||
"prepublishOnly": "npm run check && npm run clean && npm run build && npm run build:umd && npm run build:umd:min"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -31,8 +32,8 @@
|
|||
},
|
||||
"homepage": "https://github.com/reduxjs/redux-devtools",
|
||||
"devDependencies": {
|
||||
"babel-cli": "^6.3.15",
|
||||
"babel-core": "^6.1.20",
|
||||
"babel-cli": "^6.26.0",
|
||||
"babel-core": "^6.26.0",
|
||||
"babel-eslint": "4.1.8",
|
||||
"babel-loader": "^6.2.0",
|
||||
"babel-preset-es2015-loose": "^6.1.3",
|
||||
|
@ -42,7 +43,8 @@
|
|||
"immutable": "3.7.6",
|
||||
"jest": "^23.6.0",
|
||||
"rimraf": "^2.3.4",
|
||||
"webpack": "1.12.13"
|
||||
"webpack": "^4.27.1",
|
||||
"webpack-cli": "^3.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"lodash": "^4.2.1"
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
var webpack = require('webpack');
|
||||
|
||||
var plugins = [
|
||||
new webpack.optimize.OccurenceOrderPlugin(),
|
||||
new webpack.DefinePlugin({
|
||||
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV)
|
||||
})
|
||||
];
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
plugins.push(
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
compressor: {
|
||||
screw_ie8: true,
|
||||
warnings: false
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
module: {
|
||||
loaders: [{
|
||||
test: /\.js$/,
|
||||
loaders: ['babel-loader'],
|
||||
exclude: /node_modules/
|
||||
}]
|
||||
},
|
||||
output: {
|
||||
library: 'map2tree',
|
||||
libraryTarget: 'umd'
|
||||
},
|
||||
plugins: plugins,
|
||||
resolve: {
|
||||
extensions: ['', '.js']
|
||||
}
|
||||
};
|
31
packages/map2tree/webpack.config.umd.js
Normal file
31
packages/map2tree/webpack.config.umd.js
Normal file
|
@ -0,0 +1,31 @@
|
|||
const path = require('path');
|
||||
|
||||
module.exports = (env = {}) => (
|
||||
{
|
||||
mode: 'production',
|
||||
entry: {
|
||||
app: ['./src/index.js']
|
||||
},
|
||||
output: {
|
||||
library: 'd3tooltip',
|
||||
libraryTarget: 'umd',
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
filename: env.minimize ? 'map2tree.min.js' : 'map2tree.js'
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.js$/,
|
||||
loader: 'babel-loader',
|
||||
exclude: /node_modules/
|
||||
}
|
||||
]
|
||||
},
|
||||
optimization: {
|
||||
minimize: !!env.minimize
|
||||
},
|
||||
performance: {
|
||||
hints: false
|
||||
}
|
||||
}
|
||||
);
|
|
@ -1,5 +1,4 @@
|
|||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
|
||||
module.exports = (env = {}) => (
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
"description": "Redux DevTools Diff Monitor",
|
||||
"scripts": {
|
||||
"build": "npm run build:lib",
|
||||
"build:lib": "NODE_ENV=production babel src --out-dir lib",
|
||||
"build:demo": "NODE_ENV=production webpack -p",
|
||||
"build:lib": "cross-env NODE_ENV=production babel src --out-dir lib",
|
||||
"build:demo": "cross-env NODE_ENV=production webpack -p",
|
||||
"stats": "webpack --profile --json > stats.json",
|
||||
"start": "webpack-dev-server",
|
||||
"lint": "eslint --ext .jsx,.js --max-warnings 0 src",
|
||||
|
@ -26,7 +26,7 @@
|
|||
"babel-cli": "^6.4.5",
|
||||
"babel-core": "^6.4.5",
|
||||
"babel-eslint": "^7.1.0",
|
||||
"babel-loader": "^6.2.2",
|
||||
"babel-loader": "^7.1.5",
|
||||
"babel-plugin-react-transform": "^2.0.0",
|
||||
"babel-plugin-transform-runtime": "^6.4.3",
|
||||
"babel-preset-es2015": "^6.3.13",
|
||||
|
@ -34,15 +34,14 @@
|
|||
"babel-preset-stage-0": "^6.3.13",
|
||||
"base16": "^1.0.0",
|
||||
"chokidar": "^1.6.1",
|
||||
"clean-webpack-plugin": "^0.1.8",
|
||||
"clean-webpack-plugin": "^1.0.0",
|
||||
"cross-env": "^5.2.0",
|
||||
"eslint": "^4.0.0",
|
||||
"eslint-loader": "^1.2.1",
|
||||
"eslint-plugin-babel": "^4.0.0",
|
||||
"eslint-plugin-react": "^6.6.0",
|
||||
"export-files-webpack-plugin": "0.0.1",
|
||||
"html-webpack-plugin": "^2.8.1",
|
||||
"imports-loader": "^0.6.5",
|
||||
"json-loader": "^0.5.4",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
"lodash.shuffle": "^4.2.0",
|
||||
"nyan-progress-webpack-plugin": "^1.1.4",
|
||||
"raw-loader": "^0.5.1",
|
||||
|
@ -58,8 +57,9 @@
|
|||
"redux-devtools": "^3.1.0",
|
||||
"redux-devtools-dock-monitor": "^1.0.1",
|
||||
"redux-logger": "^2.5.2",
|
||||
"webpack": "^1.12.13",
|
||||
"webpack-dev-server": "^1.14.1"
|
||||
"webpack": "^4.27.1",
|
||||
"webpack-cli": "^3.2.0",
|
||||
"webpack-dev-server": "^3.1.14"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": ">=15.0.0",
|
||||
|
|
|
@ -10,6 +10,7 @@ var pkg = require('./package.json');
|
|||
var isProduction = process.env.NODE_ENV === 'production';
|
||||
|
||||
module.exports = {
|
||||
mode: process.env.NODE_ENV || 'development',
|
||||
devtool: 'eval',
|
||||
entry: isProduction ?
|
||||
[ './demo/src/js/index' ] :
|
||||
|
@ -20,8 +21,7 @@ module.exports = {
|
|||
],
|
||||
output: {
|
||||
path: path.join(__dirname, 'demo/dist'),
|
||||
filename: 'js/bundle.js',
|
||||
hash: true
|
||||
filename: 'js/bundle.js'
|
||||
},
|
||||
plugins: [
|
||||
new CleanWebpackPlugin(isProduction ? ['demo/dist'] : []),
|
||||
|
@ -36,7 +36,6 @@ module.exports = {
|
|||
NODE_ENV: JSON.stringify(process.env.NODE_ENV)
|
||||
},
|
||||
}),
|
||||
new webpack.NoErrorsPlugin(),
|
||||
new NyanProgressWebpackPlugin()
|
||||
].concat(isProduction ? [
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
|
@ -48,19 +47,16 @@ module.exports = {
|
|||
new webpack.HotModuleReplacementPlugin()
|
||||
]),
|
||||
resolve: {
|
||||
extensions: ['', '.js', '.jsx']
|
||||
extensions: ['*', '.js', '.jsx']
|
||||
},
|
||||
module: {
|
||||
loaders: [{
|
||||
rules: [{
|
||||
test: /\.jsx?$/,
|
||||
loaders: ['babel'],
|
||||
loader: 'babel-loader',
|
||||
include: [
|
||||
path.join(__dirname, 'src'),
|
||||
path.join(__dirname, 'demo/src/js')
|
||||
]
|
||||
}, {
|
||||
test: /\.json$/,
|
||||
loader: 'json'
|
||||
}]
|
||||
},
|
||||
devServer: isProduction ? null : {
|
||||
|
|
|
@ -47,8 +47,7 @@
|
|||
"jest": "^23.6.0",
|
||||
"redux": "^4.0.0",
|
||||
"rimraf": "^2.3.4",
|
||||
"rxjs": "^5.0.0-beta.6",
|
||||
"webpack": "^1.11.0"
|
||||
"rxjs": "^5.0.0-beta.6"
|
||||
},
|
||||
"dependencies": {
|
||||
"lodash": "^4.2.0",
|
||||
|
|
|
@ -11,8 +11,6 @@
|
|||
"clean": "rimraf lib",
|
||||
"build": "babel src --out-dir lib",
|
||||
"lint": "eslint src test",
|
||||
"test": "NODE_ENV=test mocha --compilers js:babel-core/register --recursive",
|
||||
"test:watch": "NODE_ENV=test mocha --compilers js:babel-core/register --recursive --watch",
|
||||
"prepare": "npm run build",
|
||||
"prepublishOnly": "npm run lint && npm run test && npm run clean && npm run build"
|
||||
},
|
||||
|
@ -46,11 +44,7 @@
|
|||
"eslint": "^0.23",
|
||||
"eslint-config-airbnb": "0.0.6",
|
||||
"eslint-plugin-react": "^3.6.3",
|
||||
"expect": "^1.6.0",
|
||||
"mocha": "^2.2.5",
|
||||
"mocha-jsdom": "^1.0.0",
|
||||
"rimraf": "^2.3.4",
|
||||
"webpack": "^1.11.0"
|
||||
"rimraf": "^2.3.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^15.0.0 || ^16.0.0",
|
||||
|
|
|
@ -73,9 +73,7 @@
|
|||
"redux-devtools-inspector": "^0.11.0",
|
||||
"rimraf": "^2.5.2",
|
||||
"style-loader": "^0.13.1",
|
||||
"url-loader": "^0.5.7",
|
||||
"webpack": "^2.2.1",
|
||||
"webpack-dev-server": "^2.3.0"
|
||||
"url-loader": "^0.5.7"
|
||||
},
|
||||
"dependencies": {
|
||||
"devui": "^1.0.0-0",
|
||||
|
|
|
@ -49,8 +49,7 @@
|
|||
"react-dom": "^16.0.0",
|
||||
"react-redux": "^6.0.0",
|
||||
"redux": "^4.0.0",
|
||||
"rimraf": "^2.3.4",
|
||||
"webpack": "^1.11.0"
|
||||
"rimraf": "^2.3.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^0.14.9 || ^15.3.0 || ^16.0.0",
|
||||
|
|
|
@ -44,9 +44,7 @@
|
|||
"redux-devtools": "^3.5.0",
|
||||
"rimraf": "^2.3.4",
|
||||
"style-loader": "^0.16.1",
|
||||
"todomvc-app-css": "^2.0.1",
|
||||
"webpack": "^2.2.1",
|
||||
"webpack-dev-server": "^2.4.1"
|
||||
"todomvc-app-css": "^2.0.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^0.14.0 || ^15.0.0 || ^16.0.0-0",
|
||||
|
|
Loading…
Reference in New Issue
Block a user