Commit 105338d9 authored by Sascha Herzinger's avatar Sascha Herzinger
Browse files

fixed #1 Name a file as version.min.js (ideally deploy to webjars)

parent 3e152dc4
const webpack = require('webpack');
const path = require('path');
const commitHash = require('child_process')
.execSync('git rev-parse --short HEAD')
.toString()
.trim();
module.exports = {
module.exports = (env, argv) => ({
entry: './src/index.js',
output: {
filename: 'ada-charts.js',
filename: argv.mode === 'development' ? 'ada-charts.js' : `ada-charts-${commitHash}.min.js`,
path: path.resolve(__dirname, 'lib'),
library: 'AdaCharts',
libraryExport: 'default',
......@@ -45,4 +49,4 @@ module.exports = {
plugins: [
new webpack.HotModuleReplacementPlugin(),
],
};
});
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment