bit-bundler plugins for extracting source maps into their own files
npm install bit-bundler-extractsm
bit-bundler plugin for extracting and writing source maps into their own file
```
$ npm install bit-bundler-extractsm bit-bundler-minifyjs
The example below will exract the sourcemap generated by the minifier.
> The source map file is written to match the output bundle file. So given the output file out.js, the source map file will be written to out.js.map.
` javascript
var Bitbundler = require("bit-bundler");
Bitbundler.bundle({
src: "in.js",
dest: "out.js"
}, {
bundler: [
"bit-bundler-minifyjs",
"bit-bundler-extractsm"
]
});
`
You can use bit-bundler-extractsm to remove sourcemaps from your bundle.
` javascript
var Bitbundler = require("bit-bundler");
Bitbundler.bundle({
src: "in.js",
dest: "out.js"
}, {
bundler: [
"bit-bundler-minifyjs",
["bit-bundler-extractsm", false]
]
});
`
To remove sourcemaps from a bundle split, you need to specify the name of the bundle. In the example below we remove the sourcemaps from vendor.
` javascript
var Bitbundler = require("bit-bundler");
Bitbundler.bundle({
src: "in.js",
dest: "out.js"
}, {
bundler: [
["bit-bundler-splitter", [
{ name: "vendor", dest: "dest/vendor.js", match: { path: /\/node_modules\// } }],
{ name: "renderer", dest: "dest/renderer.js", match: { path: /\/src\/renderer\// } }
],
"bit-bundler-minifyjs",
["bit-bundler-extractsm", {
vendor: false
}]
]
});
``