mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-24 02:23:57 +03:00
29 lines
625 B
TypeScript
29 lines
625 B
TypeScript
|
import * as path from 'path';
|
||
|
|
||
|
export default (env: { production?: boolean } = {}) => ({
|
||
|
mode: env.production ? 'production' : 'development',
|
||
|
entry: {
|
||
|
app: ['./src/index'],
|
||
|
},
|
||
|
output: {
|
||
|
library: 'd3-state-visualizer',
|
||
|
libraryTarget: 'umd',
|
||
|
path: path.resolve(__dirname, 'dist'),
|
||
|
filename: env.production
|
||
|
? 'd3-state-visualizer.min.js'
|
||
|
: 'd3-state-visualizer.js',
|
||
|
},
|
||
|
module: {
|
||
|
rules: [
|
||
|
{
|
||
|
test: /\.(js|ts)$/,
|
||
|
loader: 'babel-loader',
|
||
|
exclude: /node_modules/,
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
resolve: {
|
||
|
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
||
|
},
|
||
|
});
|