redux-devtools/packages/d3tooltip/webpack.config.umd.ts

27 lines
583 B
TypeScript
Raw Permalink Normal View History

import * as path from 'path';
2019-01-09 03:06:21 +03:00
export default (env: { production?: boolean } = {}) => ({
mode: env.production ? 'production' : 'development',
2019-01-10 21:51:14 +03:00
entry: {
app: ['./src/index'],
2019-01-10 21:51:14 +03:00
},
output: {
library: 'd3tooltip',
libraryTarget: 'umd',
path: path.resolve(__dirname, 'dist'),
filename: env.production ? 'd3tooltip.min.js' : 'd3tooltip.js',
2019-01-10 21:51:14 +03:00
},
module: {
rules: [
{
test: /\.(js|ts)$/,
2019-01-10 21:51:14 +03:00
loader: 'babel-loader',
exclude: /node_modules/,
},
],
2019-01-10 21:51:14 +03:00
},
resolve: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
2019-01-10 21:51:14 +03:00
});