1
0
Fork 0

fix(build): move sinon to vendor chunk

This commit is contained in:
ssube 2019-06-30 18:43:52 -05:00
parent 31d1977f3b
commit d02b223c6d
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
2 changed files with 8 additions and 6 deletions

View File

@ -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')) {

View File

@ -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);
}) });
}); });