UNPKG

react-speech

Version:

React component for the web speech synthesis api

39 lines (37 loc) 703 B
const path = require('path'); const webpack = require('webpack'); module.exports = { entry: './src/speech', output: { path: path.join(__dirname, './dist'), library: 'ReactSpeech', filename: 'react-speech.min.js', libraryTarget: 'umd' }, module: { rules: [ { test: /\.(js|jsx)$/, exclude: /node_modules/, use: { loader: 'babel-loader' } } ] }, externals: [ { react: { root: 'React', commonjs2: 'react', commonjs: 'react', amd: 'react' } } ], plugins: [ new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('production') }) ] };