Skip to content

Commit

Permalink
fix: make react an external during webpack build
Browse files Browse the repository at this point in the history
and point webpack output at dist/index.js
  • Loading branch information
iloveagent57 committed Aug 18, 2020
1 parent 0b1405e commit c739d71
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@edx/frontend-enterprise",
"version": "1.0.0-semantically-released",
"description": "Frontend utilities for supporting enterprise features.",
"main": "dist/main.js",
"main": "dist/index.js",
"publishConfig": {
"access": "public"
},
Expand Down
4 changes: 4 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ module.exports = {
entry: './src/index.js',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'index.js',
libraryTarget: 'umd',
globalObject: 'typeof self !== \'undefined\' ? self : this',
},
externals: {
react: 'react',
},
resolve: {
extensions: ['.js', '.jsx'],
},
Expand Down

0 comments on commit c739d71

Please sign in to comment.