<p dir="auto">I have been trying to use a full ES6 webpack configuration file using Babel 6 but it seems that <code class="notranslate">export default</code> if in fact not exporting anything.</p>
<p dir="auto">I named my config file webpack.config.babel.js and this is the code:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import path from 'path';
import HtmlwebpackPlugin from 'html-webpack-plugin';

const ROOT_PATH = path.resolve(__dirname);
const APP_PATH = path.resolve(ROOT_PATH, 'app');
const BUILD_PATH = path.resolve(ROOT_PATH, 'build');

export default {
  entry: APP_PATH,

  output: {
    path: BUILD_PATH,
    filename: 'bundle.js'
  },

  plugins: [
    new HtmlwebpackPlugin({
      title: 'React Kanban App'
    })
  ]
};"><pre class="notranslate"><code class="notranslate">import path from 'path';
import HtmlwebpackPlugin from 'html-webpack-plugin';

const ROOT_PATH = path.resolve(__dirname);
const APP_PATH = path.resolve(ROOT_PATH, 'app');
const BUILD_PATH = path.resolve(ROOT_PATH, 'build');

export default {
  entry: APP_PATH,

  output: {
    path: BUILD_PATH,
    filename: 'bundle.js'
  },

  plugins: [
    new HtmlwebpackPlugin({
      title: 'React Kanban App'
    })
  ]
};
</code></pre></div>
<p dir="auto">Every time I run webpack I just get the webpack options list and a message saying <code class="notranslate">Output filename not configured.</code>, but If I change the expression to <code class="notranslate">module.exports = { ... }</code> everything works fine.</p>
<p dir="auto">My <code class="notranslate">.babelrc</code> file is like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
  &quot;presets&quot;: [
    &quot;es2015&quot;,
    &quot;react&quot;
  ]
}"><pre class="notranslate"><code class="notranslate">{
  "presets": [
    "es2015",
    "react"
  ]
}
</code></pre></div>
<p dir="auto">And my dependencies are:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;devDependencies&quot;: {
    &quot;babel-core&quot;: &quot;^6.1.21&quot;,
    &quot;babel-preset-es2015&quot;: &quot;^6.1.18&quot;,
    &quot;babel-preset-react&quot;: &quot;^6.1.18&quot;,
    &quot;webpack&quot;: &quot;^1.12.6&quot;
  }"><pre class="notranslate"><code class="notranslate">"devDependencies": {
    "babel-core": "^6.1.21",
    "babel-preset-es2015": "^6.1.18",
    "babel-preset-react": "^6.1.18",
    "webpack": "^1.12.6"
  }
</code></pre></div>
<p dir="auto">I can't figure out what is going on here, is this a bug?</p>
<p dir="auto">I try to use es2015+ code in my <code class="notranslate">webpack.config.babel.js</code> file. After the recent upgrade this convention no longer works.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export default {
  entry: './app.js',
  output: {
    path: __dirname,
    filename: 'bundle.js'
  },
  module: {
    loaders: [
      {
        test: /\.js$/,
        loader: 'babel',
        exclude: /node_modules/,
        query: {
          cacheDirectory: true,
          presets: ['es2015']
        }
      }
    ]
  }
}"><pre class="notranslate"><code class="notranslate">export default {
  entry: './app.js',
  output: {
    path: __dirname,
    filename: 'bundle.js'
  },
  module: {
    loaders: [
      {
        test: /\.js$/,
        loader: 'babel',
        exclude: /node_modules/,
        query: {
          cacheDirectory: true,
          presets: ['es2015']
        }
      }
    ]
  }
}
</code></pre></div>
<p dir="auto">I will get the error: <code class="notranslate">SyntaxError: Unexpected token export</code></p>
<p dir="auto">For reference, here is the <code class="notranslate">package.json</code> file:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
  &quot;devDependencies&quot;: {
    &quot;babel-core&quot;: &quot;^6.0.17&quot;,
    &quot;babel-loader&quot;: &quot;^6.0.1&quot;,
    &quot;babel-preset-es2015&quot;: &quot;^6.0.15&quot;,
    &quot;webpack&quot;: &quot;^1.12.2&quot;
  }
}"><pre class="notranslate"><code class="notranslate">{
  "devDependencies": {
    "babel-core": "^6.0.17",
    "babel-loader": "^6.0.1",
    "babel-preset-es2015": "^6.0.15",
    "webpack": "^1.12.2"
  }
}
</code></pre></div>