diff --git a/webpack/es6.config.js b/webpack/es6.config.js index d45a3d96..4ac398c9 100644 --- a/webpack/es6.config.js +++ b/webpack/es6.config.js @@ -1,9 +1,12 @@ const { merge } = require('webpack-merge'); const webpackCommon = require('./common.config'); const path = require('path'); +const CopyWebpackPlugin = require('copy-webpack-plugin'); delete webpackCommon.output; // overwrite +const outputPath = path.resolve(__dirname, '../lib'); + module.exports = merge(webpackCommon, { mode: 'production', @@ -16,7 +19,7 @@ module.exports = merge(webpackCommon, { output: { filename: '[name].js', - path: path.resolve(__dirname, '../lib'), + path: outputPath, chunkFilename: '[name].js', publicPath: '', library: { @@ -24,6 +27,15 @@ module.exports = merge(webpackCommon, { } }, + plugins: [ + new CopyWebpackPlugin({ + patterns: [{ + from: path.resolve(__dirname, '../src/config/profiles'), + to: `${outputPath}/profiles` + }] + }) + ], + experiments: { outputModule: true }