Skip to content

Commit 5f8df2a

Browse files
committed
Update docs and code comments for clarity
1 parent fd79311 commit 5f8df2a

2 files changed

Lines changed: 2 additions & 10 deletions

File tree

index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ function ViteEjsPlugin(data: ViteEjsPluginDataType = {}, options?: ViteEjsPlugin
3232
transformIndexHtml: {
3333
enforce: "pre",
3434
transform(html) {
35-
// config.isProduction
3635
try {
3736
if (typeof data === "function") data = data(config);
3837
let ejsOptions = options && options.ejs ? options.ejs : {};
@@ -47,7 +46,8 @@ function ViteEjsPlugin(data: ViteEjsPluginDataType = {}, options?: ViteEjsPlugin
4746
...data
4847
},
4948
{
50-
views: [config.root], // Set views directory that can be overwritten
49+
// setting views enables includes support
50+
views: [config.root],
5151
...ejsOptions,
5252
async: false // Force sync
5353
}

readme.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,6 @@ return {
8787
}
8888
```
8989

90-
## Configuration
91-
92-
The `ViteEjsPlugin` has 2 configuration
93-
94-
- `watchEjsFiles` - default: `false` - Watch for changes in ejs files and re-render the entrypoint
95-
- `ejsOptions` - default: `{views: [viteConfig.root]}` - Options for the ejs render function
96-
97-
9890
### Configure EJS
9991

10092
You can configure ejs by passing an object to the plugin.

0 commit comments

Comments
 (0)