mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 11:01:21 +08:00
fix: use compiler object
This commit is contained in:
@ -120,7 +120,12 @@ exports[`vue configuration for android 1`] = `
|
|||||||
{
|
{
|
||||||
loader: 'vue-loader',
|
loader: 'vue-loader',
|
||||||
options: {
|
options: {
|
||||||
compiler: 'nativescript-vue-template-compiler'
|
compiler: {
|
||||||
|
compile: function () { /* omitted long function */ },
|
||||||
|
compileToFunctions: function () { /* omitted long function */ },
|
||||||
|
parseComponent: function () { /* omitted long function */ },
|
||||||
|
registerElement: function () { /* omitted long function */ }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -312,7 +317,12 @@ exports[`vue configuration for ios 1`] = `
|
|||||||
{
|
{
|
||||||
loader: 'vue-loader',
|
loader: 'vue-loader',
|
||||||
options: {
|
options: {
|
||||||
compiler: 'nativescript-vue-template-compiler'
|
compiler: {
|
||||||
|
compile: function () { /* omitted long function */ },
|
||||||
|
compileToFunctions: function () { /* omitted long function */ },
|
||||||
|
parseComponent: function () { /* omitted long function */ },
|
||||||
|
registerElement: function () { /* omitted long function */ }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
"@types/loader-utils": "^2.0.1",
|
"@types/loader-utils": "^2.0.1",
|
||||||
"@types/terser-webpack-plugin": "^5.0.2",
|
"@types/terser-webpack-plugin": "^5.0.2",
|
||||||
"jest": "^26.6.3",
|
"jest": "^26.6.3",
|
||||||
|
"nativescript-vue-template-compiler": "^2.8.2",
|
||||||
"ts-jest": "^26.4.4",
|
"ts-jest": "^26.4.4",
|
||||||
"typescript": "^4.1.2"
|
"typescript": "^4.1.2"
|
||||||
},
|
},
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
import base from './base';
|
import * as compiler from 'nativescript-vue-template-compiler';
|
||||||
import Config from 'webpack-chain';
|
|
||||||
import { VueLoaderPlugin } from 'vue-loader';
|
import { VueLoaderPlugin } from 'vue-loader';
|
||||||
import { env as _env, IWebpackEnv } from '../index';
|
|
||||||
import { merge } from 'webpack-merge';
|
import { merge } from 'webpack-merge';
|
||||||
|
import Config from 'webpack-chain';
|
||||||
|
import base from './base';
|
||||||
|
import { env as _env, IWebpackEnv } from '../index';
|
||||||
import { getPlatform } from '../helpers/project';
|
import { getPlatform } from '../helpers/project';
|
||||||
|
|
||||||
export default function (config: Config, env: IWebpackEnv = _env): Config {
|
export default function (config: Config, env: IWebpackEnv = _env): Config {
|
||||||
@ -23,9 +24,7 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
|
|||||||
.tap((options) => {
|
.tap((options) => {
|
||||||
return {
|
return {
|
||||||
...options,
|
...options,
|
||||||
// todo: should be a compiler object
|
compiler,
|
||||||
// but we want it as an external dependency
|
|
||||||
compiler: 'nativescript-vue-template-compiler',
|
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
.end();
|
.end();
|
||||||
|
Reference in New Issue
Block a user