Commit 020556bd authored by hewenhao's avatar hewenhao

chore: build config

parent 6fb5e2b2
/* 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");
const merge = require("webpack-merge");
module.exports = { module.exports = {
publicPath: "./", publicPath: "./",
...@@ -33,18 +34,22 @@ module.exports = { ...@@ -33,18 +34,22 @@ module.exports = {
.rule("ts") .rule("ts")
.use("ts-loader") .use("ts-loader")
.tap(options => { .tap(options => {
return Object.assign(options || {}, { options = merge(options, {
transpileOnly: false, transpileOnly: true,
getCustomTransformers: () => ({ getCustomTransformers: () => ({
before: [ before: [
tsImportPluginFactory({ tsImportPluginFactory({
libraryDirectory: "es",
libraryName: "vant", libraryName: "vant",
libraryDirectory: "es",
style: true style: true
}) })
] ]
}) }),
compilerOptions: {
module: "es2015"
}
}); });
return options;
}); });
}, },
css: { css: {
......
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 to comment