Skip to content

Commit ee128c1

Browse files
update webpack config
1 parent 629db69 commit ee128c1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

webpack.config.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const library = pkg.name
77
module.exports = (env) => {
88
const isProduction = env === 'production';
99
return {
10-
entry: './src/index.js',
10+
entry: './src/index.ts',
1111
output: {
1212
filename: isProduction ? 'stringToReactComponent.umd.min.js' : 'stringToReactComponent.umd.js',
1313
path: path.resolve(__dirname, 'build'),
@@ -21,7 +21,7 @@ module.exports = (env) => {
2121
module: {
2222
rules: [
2323
{
24-
test: /\.m?js$/,
24+
test: /\.(js|jsx|tsx|ts)$/,
2525
exclude: /(node_modules|bower_components)/,
2626
use: {
2727
loader: 'babel-loader',
@@ -34,6 +34,7 @@ module.exports = (env) => {
3434
],
3535
},
3636
resolve: {
37+
extensions: ['*', '.js', '.jsx', '.tsx', '.ts'],
3738
alias: {
3839
assets: path.resolve(__dirname, 'assets'),
3940
},

0 commit comments

Comments
 (0)