I have a webpack 2 configuration as follows:
module.exports = {
context: __dirname,
entry: [
"./app.ts",
"./tab.ts",
"./client/clientService.ts",
"./client/clientSearchComponent.ts",
"./infrastructure/messageComponent.ts",
"./infrastructure/typeaheadComponent.ts",
"./url.ts"],
output: {
filename: "./wwwroot/js/admin/admin.js"
},
devtool: "source-map",
module: {
rules: [
{ test: /\.ts$/, use: 'ts-loader' }
]
}
};
This is imported into a gulp task as follows...
gulp.task("admin:js",
function (done) {
var configuration = require(path.join(__dirname, config.js, "admin/webpack.config.js").toString());
webpack(configuration).run(reportWebpackResults(done));
});
I am finding that I have to specify each component in entry[...]
.
How do I specify globs, they don't seem to work out of the box.
entry: [
"./client/**/*.ts", // module not found...