diff options
author | Francesco Agosti <francesco.agosti93@gmail.com> | 2019-01-26 00:51:33 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-26 00:51:33 +0800 |
commit | 1c032a103d8bedd45151bda117cbf30c12df0364 (patch) | |
tree | ea2321129b37f40917701c179351623164f81685 /packages | |
parent | e0022cd98c34fee5cb3adac38cf8920bbd30ac6c (diff) | |
parent | a9ca1f3174279dce6aa429d1c62a8f2ffb5ae5a1 (diff) | |
download | dexon-0x-contracts-1c032a103d8bedd45151bda117cbf30c12df0364.tar.gz dexon-0x-contracts-1c032a103d8bedd45151bda117cbf30c12df0364.tar.zst dexon-0x-contracts-1c032a103d8bedd45151bda117cbf30c12df0364.zip |
Merge pull request #1508 from justinbarry/development
Output Chrome 41 compatible version of 0x instant
Diffstat (limited to 'packages')
-rw-r--r-- | packages/instant/package.json | 8 | ||||
-rw-r--r-- | packages/instant/webpack.config.js | 25 |
2 files changed, 27 insertions, 6 deletions
diff --git a/packages/instant/package.json b/packages/instant/package.json index 86fac9afe..f7e15a3e0 100644 --- a/packages/instant/package.json +++ b/packages/instant/package.json @@ -9,6 +9,7 @@ "main": "umd/instant.js", "scripts": { "build": "webpack --mode production", + "build:dev": "webpack --mode development", "build:ci": "yarn build", "dev": "dotenv webpack-dev-server -- --mode development", "lint": "tslint --format stylish --project .", @@ -50,6 +51,7 @@ "@0x/typescript-typings": "^3.0.8", "@0x/utils": "^3.0.1", "@0x/web3-wrapper": "^3.2.4", + "babel-runtime": "^6.26.0", "bowser": "^1.9.4", "copy-to-clipboard": "^3.0.8", "ethereum-types": "^1.1.6", @@ -78,6 +80,12 @@ "@types/redux": "^3.6.0", "@types/styled-components": "4.0.1", "awesome-typescript-loader": "^5.2.1", + "babel-loader": "^7.1.5", + "babel-preset-env": "^1.7.0", + "babel-plugin-transform-runtime": "^6.23.0", + "babel-plugin-transform-es3-member-expression-literals": "^6.22.0", + "babel-plugin-transform-es3-property-literals": "^6.22.0", + "babel-plugin-transform-object-assign": "^6.22.0", "dotenv-cli": "^1.4.0", "enzyme": "^3.6.0", "enzyme-adapter-react-16": "^1.5.0", diff --git a/packages/instant/webpack.config.js b/packages/instant/webpack.config.js index e74cf36d9..13d574de4 100644 --- a/packages/instant/webpack.config.js +++ b/packages/instant/webpack.config.js @@ -141,12 +141,25 @@ const generateConfig = (dischargeTarget, heapConfigOptions, rollbarConfigOptions }, { test: /\.js$/, - loader: 'source-map-loader', - exclude: [ - // instead of /\/node_modules\// - path.join(process.cwd(), 'node_modules'), - path.join(process.cwd(), '../..', 'node_modules'), - ], + use: [{ + loader: 'babel-loader', + options: { + "plugins": ["transform-runtime"], + 'presets': [ + ['env', { + 'targets': { + "chrome": 41 + }, + }], + ], + }, + }, { + loader: 'source-map-loader', + }], + exclude: function(modulePath) { + return /node_modules/.test(modulePath) && + /node_modules\/(core-js|lodash|react|websocket)/.test(modulePath); + }, }, ], }, |