Skip to content

Commit b7fe93b

Browse files
authored
Merge pull request #3382 from plotly/fix-cookie-transpile
fix cookie transpiling
2 parents e37c9d1 + a512b0b commit b7fe93b

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

dash/dash-renderer/babel.config.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
module.exports = {
22
presets: [
33
'@babel/preset-typescript',
4-
'@babel/preset-env',
4+
['@babel/preset-env', {
5+
"targets": {
6+
"browsers": ["last 10 years and not dead"]
7+
}
8+
}],
59
'@babel/preset-react'
610
],
711
plugins: [
812
'@babel/plugin-proposal-class-properties',
13+
'@babel/plugin-transform-optional-chaining',
914
],
1015
};

dash/dash-renderer/package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dash/dash-renderer/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"@babel/cli": "^7.28.0",
4747
"@babel/core": "^7.28.0",
4848
"@babel/plugin-proposal-class-properties": "^7.18.6",
49+
"@babel/plugin-transform-optional-chaining": "^7.27.1",
4950
"@babel/preset-env": "^7.27.2",
5051
"@babel/preset-react": "^7.27.1",
5152
"@babel/preset-typescript": "^7.27.1",
@@ -74,12 +75,12 @@
7475
"mocha": "^10.4.0",
7576
"npm-run-all": "^4.1.5",
7677
"prettier": "^2.8.8",
78+
"rimraf": "^5.0.5",
7779
"style-loader": "^3.3.3",
7880
"ts-loader": "^9.5.2",
7981
"typescript": "^5.8.3",
8082
"webpack": "^5.101.0",
8183
"webpack-cli": "^5.1.4",
82-
"rimraf": "^5.0.5",
8384
"whatwg-fetch": "^3.6.20"
8485
},
8586
"files": [

dash/dash-renderer/webpack.base.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,17 @@ const defaults = {
1616
},
1717
{
1818
test: /\.jsx?$/,
19-
include: /node_modules[\\\/](cytoscape-fcose|ramda|react-cytoscapejs|react-redux)[\\\/]/,
19+
include: /node_modules[\\\/](cytoscape-fcose|ramda|react-cytoscapejs|react-redux|cookie)[\\\/]/,
2020
use: {
2121
loader: 'babel-loader',
2222
options: {
2323
babelrc: false,
2424
configFile: false,
2525
presets: [
2626
'@babel/preset-env'
27+
],
28+
plugins: [
29+
'@babel/plugin-transform-optional-chaining'
2730
]
2831
}
2932
}

0 commit comments

Comments
 (0)