From 2bb5a5c722f2936b7e640ceefe284e6d9f737ced Mon Sep 17 00:00:00 2001 From: MICHAEL JACKSON Date: Wed, 7 Feb 2018 21:23:41 -0800 Subject: [PATCH] Use default export --- modules/index.js | 8 +------- scripts/config.js | 4 ++-- webpack.config.js | 29 ----------------------------- 3 files changed, 3 insertions(+), 38 deletions(-) delete mode 100644 webpack.config.js diff --git a/modules/index.js b/modules/index.js index 16b3fb9..7063fa9 100644 --- a/modules/index.js +++ b/modules/index.js @@ -1,7 +1 @@ -/* eslint-env node */ -import Media from "./Media"; - -// TODO: Remove in the next major release. -Media.Media = Media; - -module.exports = Media; +export default from "./Media"; diff --git a/scripts/config.js b/scripts/config.js index 963382f..cc4e471 100644 --- a/scripts/config.js +++ b/scripts/config.js @@ -4,7 +4,7 @@ const replace = require("rollup-plugin-replace"); const resolve = require("rollup-plugin-node-resolve"); const uglify = require("rollup-plugin-uglify"); -const getPlugins = env => { +function getPlugins(env) { const plugins = [resolve()]; if (env) { @@ -36,7 +36,7 @@ const getPlugins = env => { } return plugins; -}; +} const config = { input: "modules/index.js", diff --git a/webpack.config.js b/webpack.config.js deleted file mode 100644 index 0800f83..0000000 --- a/webpack.config.js +++ /dev/null @@ -1,29 +0,0 @@ -const webpack = require('webpack') - -module.exports = { - output: { - library: 'ReactMedia', - libraryTarget: 'umd' - }, - - externals: { - react: { - root: 'React', - commonjs2: 'react', - commonjs: 'react', - amd: 'react' - } - }, - - module: { - loaders: [ - { test: /\.js$/, exclude: /node_modules/, loader: 'babel' } - ] - }, - - plugins: [ - new webpack.DefinePlugin({ - 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development') - }) - ] -}