Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
Abort the build if a 'vendor' entrypoint detected
Browse files Browse the repository at this point in the history
Previously users were encouraged to create a fake `vendor` entrypoint
which worked in conjunction with `@neutrinojs/chunk` to separate out
third-party dependencies to a vendor chunk.

However with `splitChunks`, manually specifying this entrypoint will
actually result in larger builds - so we must ensure users correctly
update their configuration.
  • Loading branch information
edmorley committed Apr 20, 2018
1 parent a2fd170 commit cfde7b9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/web/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,4 +257,13 @@ module.exports = (neutrino, opts = {}) => {

config.output.filename('[name].[chunkhash].js');
});

neutrino.on('prerun', () => {
if (neutrino.config.entryPoints.has('vendor')) {
return Promise.reject(
new Error('Vendor chunks are now automatically generated. Remove the manual `vendor` entrypoint.')
);
}
return Promise.resolve();
})
};

0 comments on commit cfde7b9

Please sign in to comment.