Skip to content

Commit 8d1cb2f

Browse files
committed
add documentation for additional options
1 parent eeb3c43 commit 8d1cb2f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/en/options.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,17 @@ module.exports = {
9797
- default: `undefined`
9898

9999
Whether to emit esModule compatible code. By default vue-loader will emit default export in commonjs format like `module.exports = ....`. When `esModule` is set to true, default export will be transpiled into `exports.__esModule = true; exports = ...`. Useful for interoperating with transpiler other than Babel, like TypeScript.
100+
101+
### preserveWhitespace
102+
103+
- type: `Boolean`
104+
- default: `true`
105+
106+
If set to `false`, the whitespaces between HTML tags in templates will be ignored.
107+
108+
### transformToRequire
109+
110+
- type: `{ [tag: string]: string | Array<string> }`
111+
- default: `{ img: 'src' }`
112+
113+
During template compilation, the compiler can transform certain attributes, such as `src` URLs, into `require` calls, so that the target asset can be handled by Webpack. The default config transforms the `src` attribute on `<img>` tags.

0 commit comments

Comments
 (0)