refactor: [UEPR-17] Changed entry point name

This commit is contained in:
MiroslavDionisiev 2024-06-26 16:42:19 +03:00
parent 67bf9d605a
commit a11ae666f9
2 changed files with 25 additions and 5 deletions

View file

@ -2,12 +2,12 @@
"name": "scratch-svg-renderer",
"version": "2.3.74",
"description": "SVG renderer for Scratch",
"main": "./dist/node/ScratchSVGRenderer.js",
"browser": "./dist/web/ScratchSVGRenderer.js",
"main": "./dist/node/scratch-svg-renderer.js",
"browser": "./dist/web/scratch-svg-renderer.js",
"exports": {
"webpack": "./src/index.js",
"browser": "./dist/web/ScratchSVGRenderer.js",
"node": "./dist/node/ScratchSVGRenderer.js",
"browser": "./dist/web/scratch-svg-renderer.js",
"node": "./dist/node/scratch-svg-renderer.js",
"default": "./src/index.js"
},
"scripts": {

View file

@ -3,7 +3,7 @@ const path = require('path');
const ScratchWebpackConfigBuilder = require('scratch-webpack-configuration');
const common = {
libraryName: 'ScratchSVGRenderer',
libraryName: 'scratch-svg-renderer',
rootPath: path.resolve(__dirname)
};
@ -12,6 +12,14 @@ const common = {
*/
const nodeConfig = new ScratchWebpackConfigBuilder(common)
.setTarget('node')
.merge({
output: {
library: {
name: 'ScratchSVGRenderer',
type: 'umd'
}
}
})
.get();
/**
@ -19,6 +27,14 @@ const nodeConfig = new ScratchWebpackConfigBuilder(common)
*/
const webConfig = new ScratchWebpackConfigBuilder(common)
.setTarget('browserslist')
.merge({
output: {
library: {
name: 'ScratchSVGRenderer',
type: 'umd'
}
}
})
.get();
/**
@ -33,6 +49,10 @@ const playgroundConfig = new ScratchWebpackConfigBuilder(common)
},
output: {
path: path.resolve(__dirname, 'playground'),
library: {
name: 'ScratchSVGRenderer',
type: 'umd'
},
publicPath: '/'
}
})