Skip to content

v2.10.5

Choose a tag to compare

@webdiscus webdiscus released this 13 Oct 10:27
· 6 commits to master since this release
94de200

Cumulative Release v1.7.0 - v2.10.5

Features

  • Added supports for inline JS.
  • Added resolving required resources in attribute blocks:
    img&attributes({
      src: require('./image.png'),
      srcset: `${require('./image1.png')} 80w, ${require('./image2.png')} 90w`,
    })
  • Added resolving for require in conditional, e.g.:
    if condition
      img(src=require('./image1.png'))
    else
      img(src=require('./image2.png'))
  • Added resolving for require in mixin argument, e.g. +image(require('./logo.png'), 'logo').
  • Added resolving for require in each in and in each of iteration object, e.g. each [key, img] of new Map([['apple', require('./apple.png')], ['sony', require('./sony.png')]]).
  • Added supports for a string value by the watchFiles option.
  • Added resolving of file alias for scripts and styles.
  • Display the error message on broken page due to fatal error.
  • Added LiveReload support on broken page due to fatal error.
  • Added support the resolving a file alias in include.
  • Added watchFiles option to watch for file changes in resolved dependencies.
  • Added support the Pug in Vue.
  • Added support an indent in Vue template for Pug code.
  • Added embedded filter :markdown with highlighting code blocks.
  • Added embedded filters :code, :highlight.
  • Added the embedFilter option to enable using in pug filters embedded in pug-loader.
  • Added embedded :escape filter to escape HTML tags.
  • Added supports the require() of the javascript source files directly in pug (works only with pug-plugin).
    It is no longer necessary to define a js file in webpack entry-point.
    For example, using the pug-plugin now following is possible:
    script(src=require('./main.js'))
    Generated HTML:
    <script src='/assets/js/main.1234abcd.js'></script>
  • Added support a function in loader option data for compile method.
  • Added resolving the variable contained a subdirectory in the relative path:
    - var file = './subdir/image.jpg';
    img(src=require(file))
  • Added resolving a required path in the variable:
    - var file = require('./subdir/image.jpg');
    img(src=file)
  • Added watching of required js and json files in pug.
  • Added supports for webpack alias as array of paths, #10.

Bug Fixes

  • Watch the SVG files referenced with a fragment, e.g. icons.svg#home.
  • Added missing node modules to compilation after rebuild.
  • Fixed loader export when template contain CRLF line separators.
  • Fixed resolving of inline JS source file.
  • Fixed asset name of script for multi-lang pages.
  • Store unique script and set actual asset name of script by LiveReload.
  • Fixed passing data option when the self options is true in compile method.
  • Fixed resolving of assets in pug templates with url query.
  • Fixed resolving of modules whose package.json contains exports field.
  • Added minimal required version of enhanced-resolve in peerDependencies to avoid using incompatible version by other modules.
  • Fixed last stable version of ansis in package.json to avoid issues in dependency.
  • Fixed resolving of the style in Pug from node_modules by module name, e.g.: link(href=require('bootstrap') rel='stylesheet').
  • Allow to use url query in script source file.
  • Fixed resolving of absolute path using root context.
  • Fixed resolving of alias to file using root context.
  • Fixed issues by resolving Pug aliases on Windows.
  • Fixed warning by watching interpolated dependencies with compile method.
  • Added supports for Webpack resolve modules.
  • Fixed require() value with complex interpolation.
  • Encode reserved chars for resource query.
  • Added support the prefixes ~ @ for file alias.
  • Fixed the :markdown filter, enable HTML tags in markdown source.
  • Fixed pug error in dependency requires restart of webpack, #14.
  • Added & and " chars in :escape filter.
  • Added support resolving npm modules in pug template.
  • Fixed collision with local variables passed in template function for compile method.
  • Fixed path error in Windows when watching dependencies.
  • Fixed optional prefix of alias in request when an alias name self contains the prefix.
  • Changed the evaluation to interpolation of required files for compile method to fix issue undefined variable.
  • Fixed issue undefined variable for method compile by use the variables in pug w/o optional chaining.