Skip to content

Commit

Permalink
build: add default profiles json files to build output in es version (#…
Browse files Browse the repository at this point in the history
…603)

* build: add default profiles json files to build output in es version

* build: simplify profiles path
  • Loading branch information
jakub-roch authored Apr 9, 2024
1 parent a749b23 commit d4ea9d7
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion webpack/es6.config.js
Original file line number Diff line number Diff line change
@@ -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',

Expand All @@ -16,14 +19,23 @@ module.exports = merge(webpackCommon, {

output: {
filename: '[name].js',
path: path.resolve(__dirname, '../lib'),
path: outputPath,
chunkFilename: '[name].js',
publicPath: '',
library: {
type: 'module'
}
},

plugins: [
new CopyWebpackPlugin({
patterns: [{
from: path.resolve(__dirname, '../src/config/profiles'),
to: `${outputPath}/profiles`
}]
})
],

experiments: {
outputModule: true
}
Expand Down

0 comments on commit d4ea9d7

Please sign in to comment.