Git Product home page Git Product logo

html-webpack-inline-style-plugin's People

Contributors

chrissargent avatar djaax avatar swanseatom avatar victorpopkov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

html-webpack-inline-style-plugin's Issues

Plugin doesn`t process a html-webpack-inline-source-plugin result

Files

index.html

<html>
  <body>
    <h1>Hello</h1>
  </body>
</html>

style.css

body {
  background: red;
}

Webpack

npm i -D github:DustinJackson/html-webpack-inline-source-plugin
// ...
const HtmlWebpackInlineStylePlugin = require('html-webpack-inline-style-plugin');
const HtmlWebpackInlineSourcePlugin = require('html-webpack-inline-source-plugin');
// ...
plugins: [
  // ...
  new HtmlWebpackPlugin({
    inlineSource: '.css$',
  }),
  new HtmlWebpackInlineSourcePlugin(),
  new HtmlWebpackInlineStylePlugin(),
],
// ...

Result

<html>
  <head>
    <style type="text/css">
      body { background: red; }
    </style>
  </head>
  <body>
    <h1>Hello</h1>
  </body>
</html>

juice configuration

Just tested it for email generation, and works great as far as I can tell.
Could it be possible to include some options to configure the Juice call ? For example, I would like to preserve all the <style> tag instead of removing it, to allow hover or pseudo-elements properties to kicks in when the mail is viewed in a browser.
It's not currently possible because the removeStyleTags propertie of Juice is at true by default, and we can't alter it from the HtmlWebpackInlineStylePlugin instanciation

Doesn't work

ERROR in   TypeError: callback is not a function

  - index.js:13 compilation.plugin
    [nowork]/[html-webpack-inline-style-plugin]/index.js:13:4

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.