Skip to content

Commit

Permalink
fix(start,build): Set up entry point as an object to allow extension …
Browse files Browse the repository at this point in the history
…or modifications (#35)
  • Loading branch information
nanovazquez authored Aug 2, 2020
1 parent e535994 commit 0d589d1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/webpack/webpack.config.app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ const webpackConfig: webpack.Configuration = {

mode: isDevelopment ? 'development' : 'production',

entry: path.resolve(ROOT_PATH, './src/index.tsx'),
entry: {
bundle: path.resolve(ROOT_PATH, './src/index.tsx'),
},

output: {
filename: 'bundle.[hash:5].min.js',
filename: '[name].[hash:5].min.js',
path: OUTPUT_PATH,
publicPath: OUTPUT_PUBLIC_PATH,
},
Expand Down
6 changes: 4 additions & 2 deletions src/webpack/webpack.config.library.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ const webpackConfig: webpack.Configuration = {

mode: isDevelopment ? 'development' : 'production',

entry: path.resolve(ROOT_PATH, './src/index.tsx'),
entry: {
index: path.resolve(ROOT_PATH, './src/index.tsx'),
},

output: {
filename: 'index.min.js',
filename: '[name].min.js',
path: OUTPUT_PATH,
libraryTarget: 'commonjs2',
},
Expand Down

0 comments on commit 0d589d1

Please sign in to comment.