We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7994dff + 32c3d00 commit 3ae931bCopy full SHA for 3ae931b
lib/build.js
@@ -50,7 +50,7 @@ function webpackConfig(dir, additionalConfig) {
50
module: {
51
rules: [
52
{
53
- test: /\.js?$/,
+ test: /\.(m?js|ts)?$/,
54
exclude: /(node_modules|bower_components)/,
55
use: {
56
loader: "babel-loader",
@@ -74,9 +74,9 @@ function webpackConfig(dir, additionalConfig) {
74
devtool: false
75
};
76
fs.readdirSync(dirPath).forEach(function(file) {
77
- if (file.match(/\.js$/)) {
78
- var name = file.replace(/\.js$/, "");
79
- webpackConfig.entry[name] = "./" + name;
+ if (file.match(/\.(m?js|ts)$/)) {
+ var name = file.replace(/\.(js|ts)$/, "");
+ webpackConfig.entry[name] = "./" + file;
80
}
81
});
82
if (additionalConfig) {
0 commit comments