mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-08-28 22:30:40 -04:00
Use UMD for web ouput
UMD output seems to be working well for the storage module; this change adjusts the web-targeted build outputs of this module to use it as well. Also, common output properties are now specified in the base config and removed from each individual config.
This commit is contained in:
parent
12acdefb5a
commit
88dada5cb8
1 changed files with 9 additions and 7 deletions
|
@ -10,6 +10,10 @@ const base = {
|
|||
port: process.env.PORT || 8073
|
||||
},
|
||||
devtool: 'cheap-module-source-map',
|
||||
output: {
|
||||
library: 'VirtualMachine',
|
||||
filename: '[name].js'
|
||||
},
|
||||
module: {
|
||||
rules: [{
|
||||
test: /\.js$/,
|
||||
|
@ -37,8 +41,8 @@ module.exports = [
|
|||
'scratch-vm.min': './src/index.js'
|
||||
},
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'dist/web'),
|
||||
filename: '[name].js'
|
||||
libraryTarget: 'umd',
|
||||
path: path.resolve('dist', 'web')
|
||||
},
|
||||
module: {
|
||||
rules: base.module.rules.concat([
|
||||
|
@ -56,10 +60,8 @@ module.exports = [
|
|||
'scratch-vm': './src/index.js'
|
||||
},
|
||||
output: {
|
||||
library: 'VirtualMachine',
|
||||
libraryTarget: 'commonjs2',
|
||||
path: path.resolve(__dirname, 'dist/node'),
|
||||
filename: '[name].js'
|
||||
path: path.resolve('dist', 'node')
|
||||
},
|
||||
plugins: base.plugins.concat([
|
||||
new CopyWebpackPlugin([{
|
||||
|
@ -87,8 +89,8 @@ module.exports = [
|
|||
]
|
||||
},
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'playground'),
|
||||
filename: '[name].js'
|
||||
libraryTarget: 'umd',
|
||||
path: path.resolve('playground')
|
||||
},
|
||||
module: {
|
||||
rules: base.module.rules.concat([
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue