<h2 dir="auto">Bug Report</h2>
<p dir="auto"><strong>Current Behavior</strong></p>
<p dir="auto">ERROR in ./js/index.js<br>
Module build failed (from ./node_modules/babel-loader/lib/index.js):<br>
Error: Duplicate plugin/preset detected.<br>
If you'd like to use two separate instances of a plugin,<br>
they need separate names, e.g.</p>
<p dir="auto">plugins: [<br>
['some-plugin', {}],<br>
['some-plugin', {}, 'some unique name'],<br>
]</p>
<p dir="auto"><strong>My webpack.prod.js</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var HtmlWebpackPlugin = require('html-webpack-plugin');

var config = {
	
	mode: 'production',
	target: 'electron-main',
	entry: './js/index.js',

	output: {
		path: __dirname + '/interface_build/prod',
		publicPath: './',
		filename: 'app.js'
	},

	module: {
		rules: [
			{
				test: /\.js$/,
				loader: 'babel-loader',
				options: {
					babelrc: true,
					presets: ['@babel/preset-env', '@babel/preset-react'],
				},
				exclude: /node_modules/,
				include: __dirname
			},
			{
				test: /\.scss$/,
				use: [
					'style-loader',
					'css-loader',
					'sass-loader'
				],
				include: __dirname
			},
			{
				test: /\.css$/,
				use: [
					'style-loader',
					'css-loader'
				],
				include: __dirname
			},
			{
				test: /\.(jpe?g|png|gif|svg)$/i,
				use: [
					{
						loader: 'url-loader',
						options: { limit: 10000 }
					},
					{
						loader: 'img-loader',
						options: { progressive: true }
					}
				],
				// loader: 'url-loader?limit=10000!img?progressive=true',
				include: __dirname
			},
			{
				test: /\.(woff|woff2|eot|ttf|otf)$/i,
				loader: 'file-loader',
				include: __dirname
			}
		]
	},
	plugins: [
		new HtmlWebpackPlugin({
			template: 'index.template.ejs',
			filename: 'index.html',
		}),
		new HtmlWebpackPlugin({
			template: 'splash.template.ejs',
			filename: 'splash.html',
			inject: false
		}),
		new HtmlWebpackPlugin({
			template: 'cpu.template.ejs',
			filename: 'cpu.html',
			inject: false
		})]
};


module.exports = config;"><pre class="notranslate"><code class="notranslate">var HtmlWebpackPlugin = require('html-webpack-plugin');

var config = {
	
	mode: 'production',
	target: 'electron-main',
	entry: './js/index.js',

	output: {
		path: __dirname + '/interface_build/prod',
		publicPath: './',
		filename: 'app.js'
	},

	module: {
		rules: [
			{
				test: /\.js$/,
				loader: 'babel-loader',
				options: {
					babelrc: true,
					presets: ['@babel/preset-env', '@babel/preset-react'],
				},
				exclude: /node_modules/,
				include: __dirname
			},
			{
				test: /\.scss$/,
				use: [
					'style-loader',
					'css-loader',
					'sass-loader'
				],
				include: __dirname
			},
			{
				test: /\.css$/,
				use: [
					'style-loader',
					'css-loader'
				],
				include: __dirname
			},
			{
				test: /\.(jpe?g|png|gif|svg)$/i,
				use: [
					{
						loader: 'url-loader',
						options: { limit: 10000 }
					},
					{
						loader: 'img-loader',
						options: { progressive: true }
					}
				],
				// loader: 'url-loader?limit=10000!img?progressive=true',
				include: __dirname
			},
			{
				test: /\.(woff|woff2|eot|ttf|otf)$/i,
				loader: 'file-loader',
				include: __dirname
			}
		]
	},
	plugins: [
		new HtmlWebpackPlugin({
			template: 'index.template.ejs',
			filename: 'index.html',
		}),
		new HtmlWebpackPlugin({
			template: 'splash.template.ejs',
			filename: 'splash.html',
			inject: false
		}),
		new HtmlWebpackPlugin({
			template: 'cpu.template.ejs',
			filename: 'cpu.html',
			inject: false
		})]
};


module.exports = config;
</code></pre></div>
<p dir="auto"><strong>My My webpack.dev.js</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var HtmlWebpackPlugin = require('html-webpack-plugin');

var config = {
	watch: true,
	mode: 'development',
	target: 'electron-main',
	entry: './js/index.js',
	devServer: {
		historyApiFallback: true,
		compress: true,
		hot: true
	},

	output: {
		path: __dirname + '/interface_build/dev',
		publicPath: './',
		filename: 'app.js'
	},

	module: {
		rules: [
			{
				test: /\.js$/,
				loader: 'babel-loader',
				options: {
				  babelrc: false,
				  presets: ['@babel/preset-env', '@babel/preset-react'],
				},
				exclude: /node_modules/,
				include: __dirname
			},
			{
				test: /\.scss$/,
				use: [
					'style-loader',
					'css-loader',
					'sass-loader'
				],
				include: __dirname
			},
			{
				test: /\.css$/,
				use: [
					'style-loader',
					'css-loader'
				],
				include: __dirname
			},
			{
				test: /\.(jpe?g|png|gif|svg)$/i,
				use: [
					{
						loader: 'url-loader',
						options: { limit: 10000 }
					},
					{
						loader: 'img-loader',
						options: { progressive: true }
					}
				],
				// loader: 'url-loader?limit=10000!img?progressive=true',
				include: __dirname
			},
			{
				test: /\.(woff|woff2|eot|ttf|otf)$/i,
				loader: 'file-loader',
				include: __dirname
			}
		]
	},
	plugins: [
		new HtmlWebpackPlugin({
			template: 'index.template.ejs',
			filename: 'index.html',
		}),
		new HtmlWebpackPlugin({
			template: 'splash.template.ejs',
			filename: 'splash.html',
			inject: false
		}),
		new HtmlWebpackPlugin({
			template: 'cpu.template.ejs',
			filename: 'cpu.html',
			inject: false
		})
	]
};


module.exports = config;
"><pre class="notranslate"><code class="notranslate">var HtmlWebpackPlugin = require('html-webpack-plugin');

var config = {
	watch: true,
	mode: 'development',
	target: 'electron-main',
	entry: './js/index.js',
	devServer: {
		historyApiFallback: true,
		compress: true,
		hot: true
	},

	output: {
		path: __dirname + '/interface_build/dev',
		publicPath: './',
		filename: 'app.js'
	},

	module: {
		rules: [
			{
				test: /\.js$/,
				loader: 'babel-loader',
				options: {
				  babelrc: false,
				  presets: ['@babel/preset-env', '@babel/preset-react'],
				},
				exclude: /node_modules/,
				include: __dirname
			},
			{
				test: /\.scss$/,
				use: [
					'style-loader',
					'css-loader',
					'sass-loader'
				],
				include: __dirname
			},
			{
				test: /\.css$/,
				use: [
					'style-loader',
					'css-loader'
				],
				include: __dirname
			},
			{
				test: /\.(jpe?g|png|gif|svg)$/i,
				use: [
					{
						loader: 'url-loader',
						options: { limit: 10000 }
					},
					{
						loader: 'img-loader',
						options: { progressive: true }
					}
				],
				// loader: 'url-loader?limit=10000!img?progressive=true',
				include: __dirname
			},
			{
				test: /\.(woff|woff2|eot|ttf|otf)$/i,
				loader: 'file-loader',
				include: __dirname
			}
		]
	},
	plugins: [
		new HtmlWebpackPlugin({
			template: 'index.template.ejs',
			filename: 'index.html',
		}),
		new HtmlWebpackPlugin({
			template: 'splash.template.ejs',
			filename: 'splash.html',
			inject: false
		}),
		new HtmlWebpackPlugin({
			template: 'cpu.template.ejs',
			filename: 'cpu.html',
			inject: false
		})
	]
};


module.exports = config;

</code></pre></div>
<p dir="auto"><strong>Expected behavior/code</strong><br>
A clear and concise description of what you expected to happen (or code).</p>
<p dir="auto"><strong>Babel Configuration (.babelrc, package.json, cli command)</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
	&quot;passPerPreset&quot;: true,
	&quot;presets&quot;: [
		&quot;@babel/preset-env&quot;,
		&quot;@babel/preset-react&quot;
	],
	&quot;env&quot;: {
		&quot;development&quot;: {
			&quot;presets&quot;: [
				&quot;react-optimize&quot;
			],
		},
		&quot;production&quot;: {
			
			&quot;plugins&quot;: [
				&quot;transform-react-constant-elements&quot;,
				&quot;transform-react-inline-elements&quot;,
				&quot;transform-react-remove-prop-types&quot;,
				&quot;transform-react-pure-class-to-function&quot;
			]
		},
		&quot;test&quot;: {
			&quot;plugins&quot;: [
				&quot;istanbul&quot;
			]
		}
	},
	&quot;plugins&quot;: [
		&quot;transform-class-properties&quot;,
		&quot;transform-object-rest-spread&quot;
	]
}"><pre class="notranslate"><span class="pl-kos">{</span>
	<span class="pl-s">"passPerPreset"</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
	<span class="pl-s">"presets"</span>: <span class="pl-kos">[</span>
		<span class="pl-s">"@babel/preset-env"</span><span class="pl-kos">,</span>
		<span class="pl-s">"@babel/preset-react"</span>
	<span class="pl-kos">]</span><span class="pl-kos">,</span>
	<span class="pl-s">"env"</span>: <span class="pl-kos">{</span>
		<span class="pl-s">"development"</span>: <span class="pl-kos">{</span>
			<span class="pl-s">"presets"</span>: <span class="pl-kos">[</span>
				<span class="pl-s">"react-optimize"</span>
			<span class="pl-kos">]</span><span class="pl-kos">,</span>
		<span class="pl-kos">}</span><span class="pl-kos">,</span>
		<span class="pl-s">"production"</span>: <span class="pl-kos">{</span>
			
			<span class="pl-s">"plugins"</span>: <span class="pl-kos">[</span>
				<span class="pl-s">"transform-react-constant-elements"</span><span class="pl-kos">,</span>
				<span class="pl-s">"transform-react-inline-elements"</span><span class="pl-kos">,</span>
				<span class="pl-s">"transform-react-remove-prop-types"</span><span class="pl-kos">,</span>
				<span class="pl-s">"transform-react-pure-class-to-function"</span>
			<span class="pl-kos">]</span>
		<span class="pl-kos">}</span><span class="pl-kos">,</span>
		<span class="pl-s">"test"</span>: <span class="pl-kos">{</span>
			<span class="pl-s">"plugins"</span>: <span class="pl-kos">[</span>
				<span class="pl-s">"istanbul"</span>
			<span class="pl-kos">]</span>
		<span class="pl-kos">}</span>
	<span class="pl-kos">}</span><span class="pl-kos">,</span>
	<span class="pl-s">"plugins"</span>: <span class="pl-kos">[</span>
		<span class="pl-s">"transform-class-properties"</span><span class="pl-kos">,</span>
		<span class="pl-s">"transform-object-rest-spread"</span>
	<span class="pl-kos">]</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto"><strong>Environment</strong></p>
<ul dir="auto">
<li>Babel version(s): v6.23.0</li>
<li>Node/npm version: Node v11.13.0 / npm v6.9.0</li>
<li>OS: Windows 10</li>
<li>Monorepo: no</li>
<li>How you are using Babel: loader</li>
</ul>
<p dir="auto"><strong>Possible Solution</strong></p>

<p dir="auto"><strong>Additional context/Screenshots</strong><br>
Add any other context about the problem here. If applicable, add screenshots to help explain.</p>
<p dir="auto">Recently, <a href="https://github.com/lerna/lerna/pull/1616" data-hovercard-type="pull_request" data-hovercard-url="/lerna/lerna/pull/1616/hovercard">lerna</a> decided to make itself illegal for anyone dealing with the American immigration agency <code class="notranslate">ICE</code>.  This means that basically every hosting provider (including AWS) is now <code class="notranslate">lerna</code>-intolerant.</p>
<p dir="auto">Problematically, I use <code class="notranslate">babel 6</code> and <code class="notranslate">babylon</code> to parse a custom programming language.  These are, unsurprisingly, very heavily tested.  I can't find a continuous integration provider that is not blocked by the new <code class="notranslate">lerna</code> license.</p>
<p dir="auto">Notably, this also means that <code class="notranslate">github</code> is now <code class="notranslate">lerna</code> intolerant.</p>
<p dir="auto">Ripping out <code class="notranslate">babel</code> would be catastrophic.  Ripping out continuous integration would be very bad as well.</p>
<p dir="auto">How do I know whether <code class="notranslate">lerna</code> has changed the legal situation around using your tools?</p>