Skip to content

Commit

Permalink
squash! Rebuild the UMD bundle using Rollup (WIP)
Browse files Browse the repository at this point in the history
This should bring the resulting UMD bundle much closer to the original
situation.
  • Loading branch information
jgonggrijp committed Jul 25, 2023
1 parent 7319490 commit 0558f9d
Show file tree
Hide file tree
Showing 3 changed files with 205 additions and 17 deletions.
206 changes: 192 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"underscore": ">=1.8.3"
},
"devDependencies": {
"@rollup/plugin-node-resolve": "^15.1.0",
"coffeescript": "^2.7.0",
"cpy-cli": "^3.1.1",
"docco": "^0.9.1",
Expand Down
15 changes: 12 additions & 3 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
import resolve from '@rollup/plugin-node-resolve';

export default [{
input: 'modules/index-default.js',
treeshake: false,
external: [/node_modules/],
plugins: [
resolve(),
],
output: {
file: 'backbone.js',
exports: 'default',
format: 'umd',
name: 'Backbone',
amd: {
id: 'backbone,'
},
noConflict: true,
globals: {
underscore: '_',
jquery: 'jQuery || Zepto || ender || $',
'underscore/modules/extend.js': '_.extend',
},
freeze: false,
sourcemap: true,
sourcemapExcludeSources: true,
},
Expand Down

0 comments on commit 0558f9d

Please sign in to comment.