Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pug-plugin

Package Overview
Dependencies
Maintainers
1
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pug-plugin - npm Package Versions

1
9

4.1.0

Diff

Changelog

Source

4.1.0 (2022-08-03)

  • feat: add the filename property to the pathData argument of the filename(pathData) function in entry object
  • docs: add in readme recipes how to keep original folder structure in output directory
webdiscus
published 4.0.0 •

Changelog

Source

4.0.0 (2022-08-03)

  • BREAKING CHANGE: default value PugPlugin.loader.option.method is now render instead of compile, because it makes sense in the vast majority of use cases.
    By compatibility issues (when the method was not specified), add the method option:
{
  loader: PugPlugin.loader,
  options: {
    method: 'compile', // now the default method is `render`
  }
},
  • BREAKING CHANGE: the outputFile property of the ResourceInfo (the argument of postprocess function) was replaced with outputPath.
    By compatibility issues (when in the postprocess was used the outputFile), add in your postprocess function the code line:
new PugPlugin({
  postprocess: (content, info) => {
    const outputFile = path.join(info.outputPath, info.assetFile); // add this line to get the removed outputFile
    // ...
    return content;
  }
}),
  • feat: add resolving of file alias for scripts and styles
  • feat: improve resolving of script files specified w/o an extension
  • feat: improve performance
  • feat: update verbose output format to display output path and asset file separately
  • feat: update pug-loader to last version optimized for using with pug-plugin
  • fix: allow using url query in script source file
  • fix: resolving of an absolute path using root context
  • fix: resolving of alias to file using root context
  • refactor: optimize code
  • docs: update readme with usage examples for render and compile methods
webdiscus
published 4.0.0-beta.1 •

webdiscus
published 4.0.0-beta.0 •

webdiscus
published 3.1.3 •

Changelog

Source

3.1.3 (2022-07-23)

  • fix: issue by webpack serv/watch when Pug contains duplicate scripts
  • fix: display warning when Pug contains duplicate scripts
  • fix: verbose outputs data when asset is data URL
webdiscus
published 3.1.2 •

Changelog

Source

3.1.2 (2022-07-23)

  • feat(experimental): display a warning when using duplicate scripts or styles in the same Pug file
  • fix: resolving of duplicate assets in difference style files processed via responsive-loader
  • fix: auto publicPath for assets processed via responsive-loader
webdiscus
published 3.1.1 •

Changelog

Source

3.1.1 (2022-07-21)

  • fix: resolving issues on Windows
  • fix: resolving issues by assets with the root path using context
  • fix: issue by split chunks from some node modules
  • docs: update readme for correct usage of split chunks configuration
webdiscus
published 3.1.0 •

Changelog

Source

3.1.0 (2022-07-19) DEPRECATED, use v3.1.1

  • feat: add extractComments option to enable/disable saving comments in *.LICENSE.txt file
  • fix: split chunks for some node modules causes error
  • fix: resolving of unique script filename when file required w/o extension
webdiscus
published 3.0.1 •

Changelog

Source

3.0.1 (2022-07-17)

  • fix: auto public path for windows
webdiscus
published 3.0.0 •

Changelog

Source

3.0.0 (2022-07-17)

⚠ BREAKING CHANGES

  • Drop support for Node 12, minimum supported version is 14.18

    • Node 12 is End-of-Life.
    • Actual version of sass-loader 13.x requires Node 14.
  • By default, the embedded CSS extractor module is now enabled. For compatibility with external extractor, you can disable extractCss module:

new PugPlugin({
  extractCss: {
    enabled: false, // disable embedded extractCss module to bypass extracting via external plugin
  },
}),

⚠ DEPRECATION

definition of extractCss as plugin module is deprecated:

new PugPlugin({
  modules: [
    PugPlugin.extractCss({
      filename: 'assets/css/[name].[contenthash].css',
    })
  ],
}),

now use the new extractCss option:

new PugPlugin({
  extractCss: {
    filename: 'assets/css/[name].[contenthash].css',
  },
}),

Note: you can still use the modules: [] option for custom settings.

Features

  • feat: add support auto publicPath
  • feat: add extractCss option for embedded CSS extract module
  • feat: defaults, the extractCss module is enabled with default options
  • feat: improved resolving of assets
  • feat: add supports for zero config,
    it means, that w/o any plugin options the pug, scss and js module will be processed with default options.
    Zero config new PugPlugin() is equivalent to:
    new PugPlugin({
      test: /\.(pug)$/,
      enabled: true,
      verbose: false,
      pretty: false,
      sourcePath: null,
      outputPath: null,
      filename: '[name].html',
      extractComments: false,
      extractCss: {
        test: /\.(css|scss|sass|less|styl)$/,
        enabled: true,
        verbose: false,
        filename: '[name].css',
        sourcePath: null,
        outputPath: null,
      },
      modules: [],
    }),
    

Bug Fixes

  • fix: assets resolving using auto publicPath
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc