diff --git a/.torch.compile.opts.js b/.torch.compile.opts.js index c9ad5ee4b4..b4679486a7 100644 --- a/.torch.compile.opts.js +++ b/.torch.compile.opts.js @@ -1,10 +1,26 @@ module.exports = { babelrc: { + plugins: [ + '@babel/plugin-proposal-object-rest-spread', + 'transform-remove-strict-mode', + [ + "module-resolver", + { + "alias": { + '@antv/g6': './src/index' + }, + } + ], + ], presets: [ "@babel/preset-env", ], sourceMaps: 'inline', }, extensions: ['.js'], - exclude: ['node_modules', 'bower_components'] + include: [ + 'src/**/*.js', + 'plugins/**/*.js', + ], + exclude: /(node_modules|bower_components)/ } diff --git a/plugins/minimap/index.js b/plugins/minimap/index.js index 351b932dbf..e9f8fe0dff 100644 --- a/plugins/minimap/index.js +++ b/plugins/minimap/index.js @@ -1,4 +1,4 @@ -const G = require('@antv/g/lib'); +const G = require('@antv/g6').G; const Base = require('../base'); const isString = require('@antv/util/lib/type/is-string'); const isNil = require('@antv/util/lib/type/is-nil');