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

@webdiscus/pug-loader

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webdiscus/pug-loader - npm Package Compare versions

Comparing version 1.7.0-beta.0 to 1.7.0

2

CHANGELOG.md

@@ -6,3 +6,3 @@ # Change log

The methods `render` and `html` are not affected.
- change the evaluation to interpolation of required files for the `compile` method () to fix issue `undefined variable`
- change the evaluation to interpolation of required files for `compile` method to fix issue `undefined variable`
- fix issue `undefined variable` for method `compile` by use the variables in pug w/o optional chaining

@@ -9,0 +9,0 @@ - added tests for the `compile` and `render` methods

{
"name": "@webdiscus/pug-loader",
"version": "1.7.0-beta.0",
"version": "1.7.0",
"description": "The pug loader resolves paths and webpack aliases in a pug template and compiles it to HTML or into a template function.",

@@ -83,3 +83,3 @@ "keywords": [

"prettier": "^2.5.1",
"pug-plugin": "^1.3.0-beta.0",
"pug-plugin": "^1.3.0",
"rimraf": "^3.0.2",

@@ -86,0 +86,0 @@ "tsconfig-paths-webpack-plugin": "^3.5.2",

@@ -504,4 +504,4 @@ <div align="center">

<a id="resolve_resources" name="resolve_resources" href="#resolve_resources"></a>
> ###💡 Resolve resources
> - in the current directory the path `MUST` start with `./`:
>### 💡 Resolve resources
> - the file in the current directory `MUST` start with `./`:
> ```pug

@@ -511,11 +511,11 @@ > img(src=require('./image.jpeg'))

> ```
> - in the parent directory the path `MUST` start with `../`:
> - the file in the parent directory `MUST` start with `../`:
> ```pug
> img(src=require('../images/image.jpeg'))
> ```
> - in the directory defined in `option.base` the path `MUST` start with `/`:
> - the file in the directory defined in `option.base` `MUST` start with `/`:
> ```pug
> img(src=require('/src/assets/images/image.jpeg'))
> ```
> - in the directory defined by `webpack aliase` the path `MAY` start with `~` or `@`, e.g. with the alias `Images: path.join(__dirname, 'src/assets/images/')`:
> - the file in the directory defined by `webpack aliase` `MAY` start with `~` or `@`, e.g. with the alias `Images: path.join(__dirname, 'src/assets/images/')`:
> ```pug

@@ -526,3 +526,3 @@ > img(src=require('Images/image.jpeg'))

> ```
> - ⚠️ using a variable with the `compile` method has a limitation: the variable `MUST NOT` contain a path, only a filename, because is interpolated at compile time:
> - ⚠️ using a variable with the `compile` method has the limitation - the variable `MUST NOT` contain a path, only a filename, because is interpolated at compile time:
> ```pug

@@ -540,3 +540,3 @@ > - const file = 'image.jpeg'

> ```
> - ⚠️ using a alias from the `paths` defined in `tsconfig.json` with the `compile` method has a limitation: the required argument `MUST` be a string only, the webpack not supports an expression with alias:\
> - ⚠️ using an alias from the `paths` defined in `tsconfig.json` with the `compile` method has the limitation - the required argument `MUST` be a string only, the webpack not supports an expression with alias:\
> tsconfig.json

@@ -557,3 +557,3 @@ > ```js

> ```
> - using a variable with `render` and `html` methods has no limitation: the variable `MAY` contain a path, because is resolved at runtime:
> - using a variable with `render` and `html` methods has no limitation - the variable `MAY` contain a path, because is resolved at runtime:
> ```pug

@@ -560,0 +560,0 @@ > - const file = '../parent/path/to/image.jpeg'

@@ -153,3 +153,3 @@ // the 'enhanced-resolve' package already used in webpack, don't need to define it in package.json

if (isWin) resolvedPath = pathToPosix(resolvedPath);
if (isWin && resolvedPath != null) resolvedPath = pathToPosix(resolvedPath);
} else {

@@ -156,0 +156,0 @@ // fix webpack require issue `Cannot find module` for the case:

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