Commit ca0ccf94 by 展昭

update test

parent 1b9aafa4
......@@ -14,6 +14,7 @@
"oidc-client": "^1.10.1",
"qs": "^6.9.4",
"qs.js": "^0.1.12",
"ts-loader": "^7.0.5",
"vant": "^2.8.3",
"vue": "^2.6.11",
"vue-axios": "^2.1.5",
......@@ -30,6 +31,7 @@
"less": "^3.0.4",
"less-loader": "^5.0.0",
"postcss-pxtorem": "^5.1.1",
"ts-import-plugin": "^1.6.6",
"typescript": "~3.8.3",
"vue-template-compiler": "^2.6.11"
}
......
......@@ -73,5 +73,15 @@ export default [
path: '/paySlipsMonth',
name: 'PaySlipsMonth',
component: () => import("@/views/PaySlipsMonth.vue")
},
{
// 测试页面
path: '/test',
name: 'test',
component: () => import("@/views/test.vue"),
meta:{
title:'测试页面',
}
}
]
\ No newline at end of file
<template>
<div class="home">
<van-button type="primary" ></van-button>
</div>
</template>
<script lang="ts">
import { Button } from "vant";
import { Component, Vue } from "vue-property-decorator";
Vue.use(Button);
@Component({
name: "Home",
})
export default class Home extends Vue {
private list: any = [];
created() {
this.$server.EmployeeService.getUserInfo({}).then(res => {
console.log(res);
});
}
}
</script>
\ No newline at end of file
const path = require("path");
const merge = require('webpack-merge');
const tsImportPluginFactory = require('ts-import-plugin');
module.exports = {
// 基本路径
......@@ -40,7 +42,23 @@ module.exports = {
.use('ts-loader')
.loader('ts-loader')
.tap(options => {
return Object.assign(options || {}, { allowTsInNodeModules: true });
options = merge(options, {
transpileOnly: true,
getCustomTransformers: () => ({
before: [
tsImportPluginFactory({
libraryName: "vant",
libraryDirectory: "es",
style: true
})
]
}),
compilerOptions: {
module: 'es2015'
}
});
return options;
//return Object.assign(options || {}, { allowTsInNodeModules: true });
});
},
configureWebpack: config => {
......@@ -63,7 +81,8 @@ module.exports = {
// css预设器配置项
loaderOptions: {},
// 启用 CSS modules for all css / pre-processor files.
modules: false
modules: false,
//requireModuleExtension
},
// use thread-loader for babel & TS in production build
// enabled by default if the machine has more than 1 cores
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment