Skip to content

Commit 36d7d27

Browse files
committed
chore: use the preferred webpack config format
1 parent 78b2c66 commit 36d7d27

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

webpack.config.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ if (!process.env.CI) {
2727
const webConfig = baseConfig.clone()
2828
.merge({
2929
output: {
30-
library: 'ScratchStorage',
31-
libraryTarget: 'umd',
30+
library: {
31+
name: 'ScratchStorage',
32+
type: 'umd2'
33+
},
3234
path: path.resolve(__dirname, 'dist', 'web'),
33-
filename: '[name].js',
3435
clean: false
3536
}
3637
});
@@ -62,10 +63,11 @@ const nodeConfig = baseConfig.clone()
6263
'scratch-storage': path.join(__dirname, './src/index.ts')
6364
},
6465
output: {
65-
libraryTarget: 'commonjs2',
66+
library: {
67+
type: 'commonjs2'
68+
},
6669
chunkFormat: 'commonjs',
6770
path: path.resolve(__dirname, 'dist', 'node'),
68-
filename: '[name].js',
6971
clean: false
7072
}
7173
})

0 commit comments

Comments
 (0)