Skip to content
This repository was archived by the owner on Sep 21, 2021. It is now read-only.

Commit 34a7f3a

Browse files
committed
Add plugins to not transpile spread operator
1 parent 41d6b01 commit 34a7f3a

File tree

5 files changed

+3329
-134
lines changed

5 files changed

+3329
-134
lines changed

packages/devtools-reps/.babelrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
2-
"presets": ["react", "flow"],
2+
"presets": ["react"],
33
"plugins": [
4+
"syntax-object-rest-spread",
45
"transform-es2015-modules-commonjs",
56
"transform-flow-strip-types"
67
]

packages/devtools-reps/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@
3737
"svg-inline-react": "^3.0.0"
3838
},
3939
"devDependencies": {
40+
"@sucrase/webpack-object-rest-spread-plugin": "^1.0.0",
4041
"babel-jest": "^22.4.1",
42+
"babel-plugin-syntax-object-rest-spread": "^6.13.0",
4143
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.0",
4244
"babel-preset-react": "^6.24.1",
4345
"devtools-config": "^0.0.15",

packages/devtools-reps/postcss.config.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

packages/devtools-reps/webpack.config.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
const { toolboxConfig } = require("devtools-launchpad/index");
66
const getConfig = require("./bin/getConfig");
77
const {isDevelopment, isFirefoxPanel} = require("devtools-config");
8+
const ObjectRestSpreadPlugin = require("@sucrase/webpack-object-rest-spread-plugin");
89

910
const path = require("path");
1011
const projectPath = path.join(__dirname, "src");
@@ -40,8 +41,11 @@ webpackConfig.resolve = {
4041
}
4142
};
4243

43-
const extra = {};
44-
webpackConfig.plugins = [];
44+
const extra = {
45+
disablePostCSS: true
46+
};
47+
48+
webpackConfig.plugins = [new ObjectRestSpreadPlugin()];
4549
if (!isDevelopment()) {
4650
webpackConfig.output.libraryTarget = "umd";
4751

0 commit comments

Comments
 (0)