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

Vue Cli 3 Build not minifying css using SSR #99

Open
Alik2015 opened this issue May 12, 2019 · 0 comments
Open

Vue Cli 3 Build not minifying css using SSR #99

Alik2015 opened this issue May 12, 2019 · 0 comments

Comments

@Alik2015
Copy link

I have been looking into Vue and have got it working with what I need.

  • Typescript
  • SSR

My sample project can be found at https://github.com/Alik2015/VueDemo. To run

  npm install
  npm run ssr:serve //development
  npm run ssr:build //production build
  npm run ssr:start

View source of page and see css has not been minified.

When building this project I observe the following:

  1. My css is in the head section of the page and not extracted (read somewhere this is default behaviour but not 100% sure)

  2. My comments still still exists in the css for example /*comment*/

  3. My html losing all spacing

I did try and set css:{extract:true} and various other options in vue.config.js but them just left it blank as none worked.

Appreciate if someone could point me in the right direction.

I am not a front-end developer so might have missed something simple.

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