mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-27 20:13:56 +03:00
40ac89aff9
* eslint base * stash * setup * stash * stash * Add jest.config.js * caught
36 lines
764 B
TypeScript
36 lines
764 B
TypeScript
import * as path from 'path';
|
|
|
|
module.exports = (env: { production?: boolean } = {}) => ({
|
|
mode: env.production ? 'production' : 'development',
|
|
entry: {
|
|
app: ['./src/index'],
|
|
},
|
|
output: {
|
|
library: 'ReactJsonTree',
|
|
libraryExport: 'default',
|
|
libraryTarget: 'umd',
|
|
path: path.resolve(__dirname, 'umd'),
|
|
filename: env.production ? 'react-json-tree.min.js' : 'react-json-tree.js',
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.(js|ts)x?$/,
|
|
loader: 'babel-loader',
|
|
exclude: /node_modules/,
|
|
},
|
|
],
|
|
},
|
|
resolve: {
|
|
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
|
},
|
|
externals: {
|
|
react: {
|
|
root: 'React',
|
|
commonjs2: 'react',
|
|
commonjs: 'react',
|
|
amd: 'react',
|
|
},
|
|
},
|
|
});
|