Giter VIP home page Giter VIP logo

Comments (12)

yyx990803 avatar yyx990803 commented on May 19, 2024 3

This seems like an html-minifier bug, but those options are not needed for Vue templates anyways. Fixed in [email protected].

from webpack.

esahione avatar esahione commented on May 19, 2024

So... I disabled the extract-text-webpack-plugin and now it's working.

from webpack.

Astray-git avatar Astray-git commented on May 19, 2024

I have the same issue if build on Debian (build config works fine on OSX and Windows).
May be related to #41 ?

from webpack.

chrisvfritz avatar chrisvfritz commented on May 19, 2024

Sounds like it is possibly related. @esahione @Astray-git I'd open an issue in extract-text-webpack-plugin detailing your issue. If you find a solution to your problem, please let us know back here!

from webpack.

chrisvfritz avatar chrisvfritz commented on May 19, 2024

I'm pretty convinced this is indeed the same issue as #41, so closing as duplicate for now.

from webpack.

Astray-git avatar Astray-git commented on May 19, 2024

Well, in my situation, the problem is not related to extract-text-webpack-plugin.

I find out the minifyCSS option for html-minifier will remove some :style biding code. (tested on Ubuntu 15.10)
‘minifyCSS' is set to true by default in vue-html-loader:
https://github.com/vuejs/vue-html-loader/blob/master/index.js#L78

from webpack.

yyx990803 avatar yyx990803 commented on May 19, 2024

@Astray-git what exactly is being removed? Example? Repro?

from webpack.

Astray-git avatar Astray-git commented on May 19, 2024

code:

<th
  :style="[
    column.styles,
    { width: column.width }
  ]">

build without minifyCSS:

<th :style="[\n            column.styles,\n            { width: column.width }\n          ]">

build with minifyCSS:

<th :style="">

from webpack.

chrisvfritz avatar chrisvfritz commented on May 19, 2024

@Astray-git I unfortunately wasn't able to reproduce the problem with that example. 😕 Could you link to an example project demonstrating the issue?

from webpack.

Astray-git avatar Astray-git commented on May 19, 2024

@chrisvfritz Try this hello.vue .
I can reproduce the bug in a fresh webpack-template project.

from webpack.

chrisvfritz avatar chrisvfritz commented on May 19, 2024

@Astray-git Thanks for the link! That helped a lot. 😃 From the Vue docs:

The Array syntax for v-bind:style allows you to apply multiple style objects to the same element:

That means column.styles should be an object rather than a string. For example:

column: {
  width: '10px',
  styles: {
    textAlign: 'center'
  }
}

Is your issue resolved after making that change?

from webpack.

Astray-git avatar Astray-git commented on May 19, 2024

@chrisvfritz Sorry, that's a mistake in my test code.
with a correct style object, the style biding template is still built to :style=""

from webpack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.