forked from vuejs/rollup-plugin-vue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoptions.js
108 lines (91 loc) · 2.51 KB
/
options.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
import { templateJs, moduleJs, scopeJs, renderJs } from './injections'
import { coffee, typescript } from './script/index'
export default {
// Style compilation options.
styleToImports: false,
autoStyles: true,
disableCssModuleStaticReplacement: false,
// Template compilation options.
compileTemplate: true,
compileOptions: {},
// Config for html-minifier.
htmlMinifier: {
caseSensitive: true,
customAttrSurround: [[/@/, new RegExp('')], [/:/, new RegExp('')]],
collapseWhitespace: true,
conservativeCollapse: true,
removeComments: true
},
// Handle with(this)
vue: {
// Remove all transforms added by vue since it's up to the user
// to use whatever he wants
// https://github.com/vuejs/vue-template-es2015-compiler/blob/master/index.js#L6
transforms: {
stripWith: true, // remove the with statement
arrow: false,
classes: false,
collections: false,
computedProperty: false,
conciseMethodProperty: false,
constLoop: false,
dangerousForOf: false,
dangerousTaggedTemplateString: false,
defaultParameter: false,
destructuring: false,
forOf: false,
generator: false,
letConst: false,
modules: false,
numericLiteral: false,
parameterDestructuring: false,
reservedProperties: false,
spreadRest: false,
stickyRegExp: false,
templateString: false,
unicodeRegExp: false
}
},
// Config for postcss-modules.
cssModules: {
generateScopedName: '[name]__[local]'
},
// Config for node-sass.
scss: {},
// Config for less.
less: {},
// Config for stylus.
stylus: {},
// Config for postcss.
postcss: {},
// Config for pug compiler.
pug: {},
// Custom injectors.
inject: {
template: {
js: templateJs,
ts: templateJs,
coffee: templateJs
},
render: {
js: renderJs,
ts: renderJs,
coffee: renderJs
},
module: {
js: moduleJs,
ts: moduleJs,
coffee: moduleJs
},
scoped: {
js: scopeJs,
ts: scopeJs,
coffee: scopeJs
}
},
// script languages.
script: {
coffee,
ts: typescript
}
}