Merge pull request #674 from antvis/fix_bundle

Fix bundle
This commit is contained in:
@thinkinggis 2021-04-25 16:36:25 +08:00 committed by GitHub
commit 26dc71755b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 5 deletions

View File

@ -72,6 +72,7 @@ module.exports = [
commonjs({
namedExports: {
eventemitter3: [ 'EventEmitter' ],
inversify: ['inject','injectable','postConstruct','Container','decorate','interfaces'],
// @see https://github.com/rollup/rollup-plugin-commonjs/issues/266
lodash: [
'isNil',
@ -84,7 +85,10 @@ module.exports = [
'isNumber',
'merge'
]
}
},
dynamicRequireTargets: [
'node_modules/inversify/lib/syntax/binding_{on,when}_syntax.js',
],
}),
babel({
extensions: [ '.js', '.ts' ]

View File

@ -1,2 +1,2 @@
const version = '2.3.7';
const version = '2.3.9';
export { version };

View File

@ -34,7 +34,7 @@
"build:cjs": "BABEL_ENV=cjs babel src --root-mode upward --out-dir lib --source-maps --extensions .ts,.tsx --delete-dir-on-start --no-comments",
"build:esm": "BABEL_ENV=esm babel src --root-mode upward --out-dir es --source-maps --extensions .ts,.tsx --delete-dir-on-start --no-comments",
"watch": "BABEL_ENV=cjs babel src --watch --root-mode upward --out-dir lib --source-maps --extensions .ts,.tsx --delete-dir-on-start --no-comments",
"buildcdn": "node_modules/.bin/rollup -c",
"build:cdn": "node_modules/.bin/rollup -c",
"lint:ts": "run-p -c lint:ts-*",
"test": "jest",
"sync": "tnpm sync"

View File

@ -25,8 +25,12 @@ export default {
commonjs({
namedExports: {
eventemitter3: [ 'EventEmitter' ],
lodash: [ 'merge' ]
}
lodash: [ 'merge' ],
inversify: ['inject','injectable']
},
dynamicRequireTargets: [
'node_modules/inversify/lib/syntax/binding_{on,when}_syntax.js',
],
}),
buble({
transforms: { generator: false }

View File

@ -1,5 +1,6 @@
import { IMapService, IMercator, IRendererService, TYPES } from '@antv/l7';
import { inject, injectable } from 'inversify';
import {
AnimationMixer,
Camera,