Skip to content

Commit

Permalink
Merge pull request #410 from samouri/opttz
Browse files Browse the repository at this point in the history
Luxonless binary should not contain any luxon imports.
  • Loading branch information
jkbrzt authored Aug 20, 2020
2 parents c7c42f9 + 6980e91 commit a96ba52
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions src/fake-luxon.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export const DateTime = {
fromJSDate() {
throw new TypeError();
}
};
6 changes: 3 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ const rruleConfig = Object.assign({
rrule: path.join(paths.source, "index.ts"),
'rrule.min': path.join(paths.source, "index.ts")
},
externals: {
luxon: 'luxon'
},
plugins: [
new webpack.NormalModuleReplacementPlugin(/^luxon$/, './fake-luxon.ts'),
]
}, commonConfig);

const rruleWithLuxonConfig = Object.assign({
Expand Down

0 comments on commit a96ba52

Please sign in to comment.