Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix webpack build error 'dependency to an entry point is not allowed' #1447

Merged
merged 2 commits into from
May 31, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"plaintest": "mocha --check-leaks -t 10000 -b -R spec test/index.js && npm run tape",
"prepublish": "npm run build",
"tape": "node test/tape/index.js | tap-spec",
"test": "npm run babel && istanbul --config=test/.istanbul.yml cover node_modules/mocha/bin/_mocha -- --check-leaks -t 5000 -b -R spec test/index.js && npm run tape"
"test": "npm run babel && istanbul --config=test/.istanbul.yml cover node_modules/mocha/bin/_mocha -- --check-leaks -t 5000 -b -R spec test/index.js && npm run tape && (npm run build && echo BUILD TEST OK || echo BUILD TEST FAILED)"
},
"bin": {
"knex": "./lib/bin/cli.js"
Expand Down
12 changes: 11 additions & 1 deletion scripts/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
var webpack = require('webpack');
var plugins = []
var plugins = [
function() {
this.plugin("done", function(stats) {
if (stats.compilation.errors && stats.compilation.errors.length && process.argv.indexOf('--watch') === -1) {
process.on('beforeExit', function() {
process.exit(1);
});
}
});
}
]

var externals = [{
"bluebird": {
Expand Down
3 changes: 1 addition & 2 deletions src/util/make-knex.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import QueryInterface from '../query/methods';
import * as helpers from '../helpers';
import { assign } from 'lodash'
import BatchInsert from './batchInsert';
import Knex from "../index";

export default function makeKnex(client) {

Expand Down Expand Up @@ -58,7 +57,7 @@ export default function makeKnex(client) {

// The `__knex__` is used if you need to duck-type check whether this
// is a knex builder, without a full on `instanceof` check.
knex.VERSION = knex.__knex__ = Knex.VERSION;
knex.VERSION = knex.__knex__ = require('../../package.json').version;

// Hook up the "knex" object as an EventEmitter.
const ee = new EventEmitter()
Expand Down