@webdiscus/pug-loader
Advanced tools
Comparing version 1.7.1 to 1.7.2
# Change log | ||
## 1.7.2 (2022-02-19) | ||
- fix path error in Windows when watching dependencies | ||
- update packages | ||
## 1.7.1 (2022-02-10) | ||
@@ -4,0 +8,0 @@ - added support for webpack alias an array of paths, [#10](https://github.com/webdiscus/pug-loader/issues/10) |
{ | ||
"name": "@webdiscus/pug-loader", | ||
"version": "1.7.1", | ||
"version": "1.7.2", | ||
"description": "The pug loader resolves paths and webpack aliases in a pug template and compiles it to HTML or into a template function.", | ||
@@ -73,17 +73,16 @@ "keywords": [ | ||
"devDependencies": { | ||
"@babel/core": "^7.17.0", | ||
"@babel/core": "^7.17.5", | ||
"@babel/preset-env": "^7.16.11", | ||
"@types/jest": "^27.4.0", | ||
"picocolors": "^1.0.0", | ||
"css-loader": "^6.6.0", | ||
"html-loader": "^3.1.0", | ||
"html-webpack-plugin": "^5.5.0", | ||
"jest": "^27.5.0", | ||
"jest": "^27.5.1", | ||
"jstransformer-markdown-it": "^2.1.0", | ||
"prettier": "^2.5.1", | ||
"pug-plugin": "^1.3.0", | ||
"pug-plugin": "^1.4.0", | ||
"rimraf": "^3.0.2", | ||
"tsconfig-paths-webpack-plugin": "^3.5.2", | ||
"webpack": "^5.68.0" | ||
"webpack": "^5.69.1" | ||
} | ||
} |
@@ -55,7 +55,7 @@ <div align="center"> | ||
## Features | ||
- rendereing pug into pure `HTML string` to save it as static HTML file | ||
- rendereing pug into pure `HTML string` to save it in separate file | ||
- compiling pug into `template function` for usage in JavaScript | ||
- generates template function with `CommonJS` or `ESM` syntax | ||
- resolves aliases from webpack `resolve.alias` and `resolve.plugins` | ||
- resolves paths from `tsconfig.json` using [`tsconfig-paths-webpack-plugin`](https://github.com/dividab/tsconfig-paths-webpack-plugin) | ||
- generates a template function with both `CommonJS` and `ESM` syntax | ||
- resolves alias from webpack `resolve.alias` | ||
- resolves alias from `compilerOptions.paths` defined in `tsconfig.json` using [`tsconfig-paths-webpack-plugin`](https://github.com/dividab/tsconfig-paths-webpack-plugin) | ||
- resolves required images in the attribute `srcset` of `img` tag | ||
@@ -756,3 +756,3 @@ - resolves required JavaScript modules or JSON in pug | ||
- more examples of usages see in [test cases](https://github.com/webdiscus/pug-loader/tree/master/test/cases) | ||
- [`ansis`][ansis] - color styling for ANSI terminals | ||
- [`ansis`][ansis] - ANSI color styling of text in terminal | ||
- [`pug GitHub`][pug] | ||
@@ -759,0 +759,0 @@ - [`pug API Reference`][pug-api] |
@@ -8,3 +8,3 @@ // add polyfill for node.js >= 12.0.0 && < 15.0.0 | ||
const { merge } = require('webpack-merge'); | ||
const { getResourceParams, injectExternalVariables } = require('./utils'); | ||
const { getResourceParams, injectExternalVariables, isWin } = require('./utils'); | ||
const resolver = require('./resolver'); | ||
@@ -133,4 +133,9 @@ const loader = require('./loader'); | ||
// add dependency files to watch changes | ||
pugResult.dependencies.forEach(loaderContext.addDependency); | ||
codeDependencies.forEach(loaderContext.addDependency); | ||
const dependencies = [...pugResult.dependencies, ...codeDependencies]; | ||
if (isWin) { | ||
dependencies.forEach((file, index, files) => { | ||
files[index] = path.normalize(file); | ||
}); | ||
} | ||
dependencies.forEach(loaderContext.addDependency); | ||
@@ -137,0 +142,0 @@ // remove pug method from query data to pass only clean data w/o options |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
62920
13
678