fix(build): move sinon to vendor chunk
This commit is contained in:
parent
31d1977f3b
commit
d02b223c6d
|
@ -9,18 +9,21 @@ const metadata = require('../package.json');
|
||||||
const shebang = '#! /usr/bin/env node';
|
const shebang = '#! /usr/bin/env node';
|
||||||
|
|
||||||
const bundle = {
|
const bundle = {
|
||||||
|
external: [
|
||||||
|
'dtrace-provider',
|
||||||
|
],
|
||||||
input: [
|
input: [
|
||||||
'src/index.ts',
|
'src/index.ts',
|
||||||
'test/harness.ts',
|
'test/harness.ts',
|
||||||
'test/**/Test*.ts',
|
'test/**/Test*.ts',
|
||||||
],
|
],
|
||||||
manualChunks(id) {
|
manualChunks(id) {
|
||||||
if (id.includes('/node_modules/')) {
|
if (id.includes('/test/') /* || id.includes('/chai/') */ || id.includes('/sinon/')) {
|
||||||
return 'vendor';
|
return 'test'
|
||||||
}
|
}
|
||||||
|
|
||||||
if (id.includes('/test/')) {
|
if (id.includes('/node_modules/')) {
|
||||||
return 'test'
|
return 'vendor';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (id.includes('/src/index')) {
|
if (id.includes('/src/index')) {
|
||||||
|
|
|
@ -159,6 +159,5 @@ describe('rule visitor', () => {
|
||||||
|
|
||||||
mockRule.verify();
|
mockRule.verify();
|
||||||
expect(ctx.errors.length).to.equal(0);
|
expect(ctx.errors.length).to.equal(0);
|
||||||
})
|
});
|
||||||
|
|
||||||
});
|
});
|
Loading…
Reference in New Issue