Skip to content

Commit

Permalink
feat: resolve extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
sunyongjian committed Oct 13, 2017
1 parent 3f7c009 commit 263db5f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/a.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from 'react';

const A = () => {
console.log(1);
return (
<div>AAAAA</div>
);
};
export default A;
2 changes: 2 additions & 0 deletions src/index.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import React from 'react';
import { render } from 'react-dom';
import A from './a';
import './index.less';

const App = () => (
<div>
<img src={require('./logo.svg')} alt="logo" />
<h2>welcome to react-quick-start</h2>
<A />
</div>
);

Expand Down
3 changes: 3 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ module.exports = {
],
},
devtool: '#source-map',
resolve: {
extensions: [".js", ".jsx", ".json"],
},
plugins: [
new HtmlWebpackPlugin({
title: 'quick-start',
Expand Down

0 comments on commit 263db5f

Please sign in to comment.