Skip to content

Commit 8adee67

Browse files
committed
fix(build): rename umd library export
1 parent a9f4a0a commit 8adee67

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"homepage": "https://github.com/chrisboustead/netlify-cms-widget-async-select",
1616
"license": "MIT",
1717
"main": "dist/index.js",
18+
"module": "src/index.js",
1819
"devDependencies": {
1920
"@babel/core": "^7.0.0",
2021
"@babel/plugin-proposal-class-properties": "^7.0.0",

webpack.config.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,13 @@ const productionConfig = {
6161
],
6262
},
6363
devtool: 'source-map',
64-
output: {
65-
path: path.resolve(__dirname, 'dist'),
66-
filename: '[name].js',
67-
library: '[name]',
68-
libraryTarget: 'umd',
69-
libraryExport: 'default',
70-
umdNamedDefine: true,
71-
globalObject: 'window',
72-
}
64+
output: {
65+
path: path.resolve(__dirname, 'dist'),
66+
filename: '[name].js',
67+
library: 'AsyncSelectWidget',
68+
libraryTarget: 'umd',
69+
libraryExport: 'default',
70+
}
7371
}
7472

7573
module.exports = process.env.NODE_ENV === 'production' ? productionConfig : developmentConfig

0 commit comments

Comments
 (0)