mirror of https://github.com/apache/superset.git
fix: cannot assign to read only property exports of object (#9319)
* fix: cannot assign to read only property exports of object * fix: compile ts from plugins * fix: add package back
This commit is contained in:
parent
adebd40d30
commit
104f3d2502
|
@ -18,6 +18,7 @@
|
|||
*/
|
||||
module.exports = {
|
||||
sourceMaps: true,
|
||||
sourceType: 'unambiguous',
|
||||
retainLines: true,
|
||||
presets: [
|
||||
'@babel/preset-react',
|
||||
|
@ -28,6 +29,8 @@ module.exports = {
|
|||
corejs: 3,
|
||||
loose: true,
|
||||
shippedProposals: true,
|
||||
modules: false,
|
||||
targets: false,
|
||||
},
|
||||
],
|
||||
],
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -160,15 +160,16 @@
|
|||
"use-query-params": "^0.4.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.5.5",
|
||||
"@babel/cli": "^7.8.4",
|
||||
"@babel/core": "^7.5.5",
|
||||
"@babel/node": "^7.5.5",
|
||||
"@babel/plugin-proposal-class-properties": "^7.7.4",
|
||||
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
|
||||
"@babel/plugin-transform-runtime": "^7.8.3",
|
||||
"@babel/preset-env": "^7.5.5",
|
||||
"@babel/preset-react": "^7.0.0",
|
||||
"@babel/register": "^7.5.5",
|
||||
"@babel/preset-env": "^7.8.7",
|
||||
"@babel/preset-react": "^7.8.3",
|
||||
"@babel/preset-typescript": "^7.8.3",
|
||||
"@babel/register": "^7.8.6",
|
||||
"@types/jest": "^23.3.5",
|
||||
"@types/jquery": "^3.3.32",
|
||||
"@types/react": "^16.4.18",
|
||||
|
@ -187,6 +188,7 @@
|
|||
"babel-plugin-css-modules-transform": "^1.1.0",
|
||||
"babel-plugin-dynamic-import-node": "^1.2.0",
|
||||
"babel-plugin-lodash": "^3.3.4",
|
||||
"babel-plugin-typescript-to-proptypes": "^1.3.2",
|
||||
"babel-preset-airbnb": "^4.0.1",
|
||||
"cache-loader": "^1.2.2",
|
||||
"clean-webpack-plugin": "^3.0.0",
|
||||
|
@ -233,9 +235,9 @@
|
|||
"tslib": "^1.10.0",
|
||||
"typescript": "^3.8.2",
|
||||
"url-loader": "^1.0.1",
|
||||
"webpack": "^4.19.0",
|
||||
"webpack": "^4.42.0",
|
||||
"webpack-assets-manifest": "^3.0.1",
|
||||
"webpack-bundle-analyzer": "^3.4.1",
|
||||
"webpack-bundle-analyzer": "^3.6.1",
|
||||
"webpack-cli": "^3.1.1",
|
||||
"webpack-dev-server": "^3.1.14",
|
||||
"webpack-sources": "^1.1.0",
|
||||
|
|
|
@ -110,6 +110,39 @@ if (isDevMode) {
|
|||
plugins.push(new OptimizeCSSAssetsPlugin());
|
||||
}
|
||||
|
||||
const BABEL_JAVASCRIPT_OPTIONS = {
|
||||
presets: [
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{
|
||||
useBuiltIns: 'usage',
|
||||
corejs: 3,
|
||||
loose: true,
|
||||
shippedProposals: true,
|
||||
modules: false,
|
||||
targets: false,
|
||||
},
|
||||
],
|
||||
'@babel/preset-react',
|
||||
],
|
||||
plugins: [
|
||||
'lodash',
|
||||
'react-hot-loader/babel',
|
||||
'@babel/plugin-proposal-object-rest-spread',
|
||||
'@babel/plugin-proposal-class-properties',
|
||||
'@babel/plugin-syntax-dynamic-import',
|
||||
],
|
||||
};
|
||||
|
||||
const BABEL_TYPESCRIPT_OPTIONS = {
|
||||
presets: BABEL_JAVASCRIPT_OPTIONS.presets.concat([
|
||||
'@babel/preset-typescript',
|
||||
]),
|
||||
plugins: BABEL_JAVASCRIPT_OPTIONS.plugins.concat([
|
||||
'babel-plugin-typescript-to-proptypes',
|
||||
]),
|
||||
};
|
||||
|
||||
const PREAMBLE = ['babel-polyfill', path.join(APP_DIR, '/src/preamble.js')];
|
||||
|
||||
function addPreamble(entry) {
|
||||
|
@ -198,28 +231,19 @@ const config = {
|
|||
use: [
|
||||
{
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
presets: [
|
||||
'airbnb',
|
||||
'@babel/preset-react',
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{
|
||||
useBuiltIns: 'usage',
|
||||
corejs: 3,
|
||||
loose: true,
|
||||
modules: false,
|
||||
shippedProposals: true,
|
||||
},
|
||||
],
|
||||
],
|
||||
plugins: [
|
||||
'lodash',
|
||||
'@babel/plugin-syntax-dynamic-import',
|
||||
'react-hot-loader/babel',
|
||||
['@babel/plugin-transform-runtime', { corejs: 3 }],
|
||||
],
|
||||
},
|
||||
options: BABEL_JAVASCRIPT_OPTIONS,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
// handle symlinked modules
|
||||
// for debugging @superset-ui packages via npm link
|
||||
test: /\.tsx?$/,
|
||||
include: /node_modules\/[@]superset[-]ui.+\/src/,
|
||||
use: [
|
||||
{
|
||||
loader: 'babel-loader',
|
||||
options: BABEL_TYPESCRIPT_OPTIONS,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue