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

build/config error #20

Closed
creeperyang opened this issue Sep 24, 2015 · 0 comments
Closed

build/config error #20

creeperyang opened this issue Sep 24, 2015 · 0 comments

Comments

@creeperyang
Copy link
Contributor

When run npm run build, get error: TypeError: Can't call method on undefined.

After debug the code, I find the reason:

// tools/config.js#L93
const appConfig = merge({}, config, {
  entry: [
    ...(WATCH && ['webpack-hot-middleware/client']),
    './src/js/app.js',
  ],
  // ...
}

when WATCH if falsy(here undefined), ...(undefined) leads to the error.

So, make it like ...(WATCH ? ['webpack-hot-middleware/client'] : []) ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant