Skip to content

Commit 7e8631a

Browse files
committed
feat: auto support for nunjucks-loader
1 parent 4cb9b9b commit 7e8631a

File tree

6 files changed

+21
-3
lines changed

6 files changed

+21
-3
lines changed

.idea/dictionaries/develar.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/en/languages-and-frameworks.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,8 @@ Please note — [Chrome devtools extension for debugging Vue.js applications](ht
5252

5353
If project has [electron-next](https://github.com/leo/electron-next) dependency, `electron-webpack dev` will not start webpack-dev-server.
5454

55-
To compile only main process, use `electron-webpack main`.
55+
To compile only main process, use `electron-webpack main`.
56+
57+
## Nunjucks
58+
59+
`yarn add nunjucks-loader nunjucks --dev`
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# 1.1.0 (2017-08-27)
2+
3+
4+
### Features
5+
6+
* Upgrade `ts-loader` to `2.3.4` ([configFile](https://github.com/TypeStrong/ts-loader/pull/607) option is now used by electron-webpack).

packages/electron-webpack-ts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "electron-webpack-ts",
3-
"version": "1.0.3",
3+
"version": "1.1.0",
44
"license": "MIT",
55
"author": "Vladimir Krivosheev <develar@gmail.com>",
66
"files": [],

packages/electron-webpack/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "electron-webpack",
3-
"version": "1.0.1",
3+
"version": "1.1.o",
44
"license": "MIT",
55
"author": "Vladimir Krivosheev <develar@gmail.com>",
66
"main": "out/webpackConfigurator.js",

packages/electron-webpack/src/targets/BaseTarget.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ export class BaseTarget {
2929
use: "node-loader"
3030
},
3131
)
32+
33+
if (configurator.hasDevDependency("nunjucks-loader")) {
34+
rules.push({
35+
test: /\.(njk|nunjucks)$/,
36+
loader: "nunjucks-loader"
37+
})
38+
}
3239
}
3340

3441
async configurePlugins(configurator: WebpackConfigurator): Promise<void> {

0 commit comments

Comments
 (0)