Open
Description
I am trying to use tsickle-loader to transpile over 140 TypeScript files that are part of the same project into JS that I can later feed into Closure Compiler.
This is my webpack.config.js file:
const path = require("path");
const fs = require("fs");
const walkSync = function (dir, filelist) {
const files = fs.readdirSync(dir);
filelist = filelist || [];
files.forEach(function (file) {
if (fs.statSync(dir + file).isDirectory()) {
filelist = walkSync(dir + file + "/", filelist);
} else {
filelist.push(dir + file);
}
});
return filelist;
};
let input = walkSync("./src/", []).filter(f => f.endsWith(".ts") || f.endsWith(".json"));
module.exports = {
entry: input,
output: {
path: path.resolve("./ts2compiler")
},
module: {
rules: [
{
test: /\.ts$/,
use: {
loader: "tsickle-loader",
options: {
tsconfig: path.resolve(__dirname, "tsconfig.json"),
externDir: "./ts2compiler"
}
}
}
]
}
};
The ẁalkSync
function is to go through all the files that are in the different directories.
When I run the command ./node_modules/.bin/webpack --config webpack.config.js
after a while I get the same error for all my files:
I tried both having my paths as absolute and relative in the entry property and it changes nothing.
Metadata
Metadata
Assignees
Labels
No labels