diff --git a/package.json b/package.json index 35bc0dead7..daeb4d93e9 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,10 @@ { "name": "@antv/g2", - "version": "3.0.0", + "version": "3.0.0-beta0", "description": "the Grammar of Graphics in Javascript", - "main": "index.js", + "main": "dist/g2.js", + "browser": "dist/g2.js", + "module": "index.js", "repository": { "type": "git", "url": "git@gitlab.alibaba-inc.com:datavis/g2.git" @@ -57,6 +59,7 @@ "lint": "eslint --ext .html,.js ./", "lint-fix": "eslint --ext .html,.js --fix ./", "prepare-demos": "./bin/prepare-demos-homepage && ./bin/prepare-demos-screenshots", + "postpublish": "npm run build && npm run compress", "test": "torch --compile --renderer --recursive ./test/unit", "test-live": "torch --compile --interactive --watch --recursive ./test/unit" }, diff --git a/webpack-dev.config.js b/webpack-dev.config.js index 089e87bf2a..fcefcc98ed 100644 --- a/webpack-dev.config.js +++ b/webpack-dev.config.js @@ -2,7 +2,6 @@ const webpackConfig = require('./webpack.config'); const _ = require('lodash'); module.exports = _.merge({ - devtool: 'cheap-source-map', watch: true, watchOptions: { aggregateTimeout: 300, diff --git a/webpack.config.js b/webpack.config.js index abec386180..b5ed2be4b1 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -2,6 +2,7 @@ const webpack = require('webpack'); const resolve = require('path').resolve; module.exports = { + devtool: 'cheap-source-map', entry: { g2: './index.js' },