Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mall-webview
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
frontend
mall-webview
Commits
3572ca7b
Commit
3572ca7b
authored
Mar 26, 2021
by
hewenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: ts-import-plugin
parent
24bcbfa7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
main.ts
src/main.ts
+0
-1
vue.config.js
vue.config.js
+20
-1
No files found.
src/main.ts
View file @
3572ca7b
...
@@ -3,7 +3,6 @@ import App from "./App.vue";
...
@@ -3,7 +3,6 @@ import App from "./App.vue";
import
router
from
"./router"
;
import
router
from
"./router"
;
import
store
from
"./store"
;
import
store
from
"./store"
;
import
"./assets/style/normalize.css"
;
import
"./assets/style/normalize.css"
;
import
"vant/lib/index.css"
;
import
"amfe-flexible"
;
import
"amfe-flexible"
;
createApp
(
App
)
createApp
(
App
)
.
use
(
store
)
.
use
(
store
)
...
...
vue.config.js
View file @
3572ca7b
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable @typescript-eslint/no-var-requires */
// const tsImportPluginFactory = require('ts-import-plugin')
const
tsImportPluginFactory
=
require
(
"ts-import-plugin"
);
module
.
exports
=
{
module
.
exports
=
{
devServer
:
{
devServer
:
{
hot
:
true
,
hot
:
true
,
...
@@ -24,6 +24,25 @@ module.exports = {
...
@@ -24,6 +24,25 @@ module.exports = {
}
}
}
}
},
},
chainWebpack
:
config
=>
{
config
.
module
.
rule
(
"ts"
)
.
use
(
"ts-loader"
)
.
tap
(
options
=>
{
return
Object
.
assign
(
options
||
{},
{
transpileOnly
:
false
,
getCustomTransformers
:
()
=>
({
before
:
[
tsImportPluginFactory
({
libraryDirectory
:
"es"
,
libraryName
:
"vant"
,
style
:
true
})
]
})
});
});
},
css
:
{
css
:
{
loaderOptions
:
{
loaderOptions
:
{
postcss
:
{
postcss
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment