Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit a98c85e

Browse files
committed
feat(wxts): support run without tslib
1 parent e38bbb7 commit a98c85e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/compiler/compile-wxts.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,18 @@ var TITLE = "wxts:";
4646
* @param {any} tsconfig
4747
*/
4848
function compileWxts(config, tsFile, tsconfig) {
49-
var ts = require("rollup-plugin-typescript");
49+
const ts = require("rollup-plugin-typescript");
5050
const gulpRollup = require("gulp-better-rollup");
5151
let dependencies = []
52+
const plugins = [].concat(loadPlugins())
53+
5254
try {
5355
dependencies = Object.keys(npm.getDependencies(process.cwd()));
56+
const newConfig = Object.assign({}, defaultConfig, tsconfig ? tsconfig.compilerOptions : {}, wxtsConfig);
57+
plugins.unshift(ts(newConfig))
5458
} catch (error) {
5559
warn(TITLE)('' + error);
5660
}
57-
var newConfig = Object.assign({}, defaultConfig, tsconfig ? tsconfig.compilerOptions : {}, wxtsConfig);
58-
const plugins = [ts(newConfig)].concat(loadPlugins());
5961
return gulp
6062
.src(tsFile, { base: config.src, sourcemaps: !config.release })
6163
.pipe(

0 commit comments

Comments
 (0)