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

Cannot set property of 'removeComments' of undefined when building in development #102

Open
Lewissss opened this issue May 17, 2019 · 2 comments

Comments

@Lewissss
Copy link

Issue:

When running the ssr:build command, the following error is given:

TypeError: Cannot set property 'removeComments' of undefined
    at webpackConfig.plugin.tap.args (C:\src\Bosun\SmeLending.Ui\node_modules\@akryum\vue-cli-plugin-ssr\lib\webpack.js:47:37)

Caused by this line:

webpackConfig.plugin('html-filter').use(HtmlFilterPlugin) if (isProd) { webpackConfig.plugin('html').tap(args => { args[0].minify.removeComments = false <<<<<<<<<<<<<<<<< return args }) }

@Lewissss
Copy link
Author

Weirdly, this issue only runs when NODE_ENV is 'development', however the actual line that fails is within an isProd check, so that code shouldnt even be running.

@dennisreimann
Copy link

This happens because if this check for the prod env.

However: Are you using the Vue CLI pages option? I remember coming across this or a similar error in that context.

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

2 participants