Skip to content

Commit

Permalink
correctly unminify dist/es5/rrule.js (#606)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgoli committed Nov 10, 2023
1 parent 3d27f69 commit 7e9e0c3
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 324 deletions.
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -75,6 +75,7 @@
"ts-loader": "^9.3.0",
"ts-node": "^10.8.1",
"typescript": "^4.7.3",
"unminified-webpack-plugin": "^3.0.0",
"webpack": "^5.73.0",
"webpack-cli": "^4.9.2"
},
Expand Down
5 changes: 3 additions & 2 deletions webpack.config.js
@@ -1,5 +1,6 @@
const path = require('path')
const TerserPlugin = require('terser-webpack-plugin')
const UnminifiedWebpackPlugin = require('unminified-webpack-plugin')

const paths = {
source: path.resolve(__dirname, 'src'),
Expand All @@ -8,7 +9,7 @@ const paths = {

const commonConfig = {
output: {
filename: '[name].js',
filename: '[name].min.js',
path: paths.es5,
library: 'rrule',
libraryTarget: 'umd',
Expand All @@ -35,13 +36,13 @@ const commonConfig = {
minimize: true,
minimizer: [new TerserPlugin()],
},
plugins: [new UnminifiedWebpackPlugin()],
}

const rruleConfig = Object.assign(
{
entry: {
rrule: path.join(paths.source, 'index.ts'),
'rrule.min': path.join(paths.source, 'index.ts'),
},
},
commonConfig
Expand Down

0 comments on commit 7e9e0c3

Please sign in to comment.