You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
691 B
26 lines
691 B
const compiler = require('@dcloudio/uni-template-compiler')
|
|
|
|
const defaultOptions = {
|
|
compiler,
|
|
hotReload: false,
|
|
cacheDirectory: false,
|
|
cacheIdentifier: false,
|
|
transformAssetUrls: false // 禁用,由 uni-template-compiler 自行实现 transformAssetUrls
|
|
}
|
|
|
|
const defaultCompilerOptions = {
|
|
preserveWhitespace: false
|
|
}
|
|
|
|
module.exports = {
|
|
test: [/\.vue$/, /\.nvue$/],
|
|
loader: require.resolve('@dcloudio/vue-cli-plugin-uni/packages/vue-loader'),
|
|
options (options = {}, compilerOptions = {}) {
|
|
return Object.assign({},
|
|
defaultOptions,
|
|
options, {
|
|
compilerOptions: Object.assign({}, defaultCompilerOptions, compilerOptions)
|
|
})
|
|
},
|
|
compiler
|
|
}
|
|
|