Skip to content

Commit

Permalink
Workaround for compilation due to
Browse files Browse the repository at this point in the history
patternfly/react-topology#118

part of #400

Signed-off-by: Aurélien Pupier <[email protected]>
  • Loading branch information
apupier committed Nov 24, 2023
1 parent 8b080ff commit b67c70b
Show file tree
Hide file tree
Showing 3 changed files with 318 additions and 4 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@
"npm-link-shared": "^0.5.6",
"os-browserify": "^0.3.0",
"path-browserify": "^1.0.1",
"remove-files-webpack-plugin": "^1.5.0",
"rimraf": "^5.0.5",
"sass": "^1.66.1",
"sass-loader": "^13.0.2",
Expand Down
14 changes: 11 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const { merge } = require('webpack-merge');
const CopyPlugin = require('copy-webpack-plugin');
const RemovePlugin = require('remove-files-webpack-plugin');
const path = require('path');
function posixPath(pathStr) {
return pathStr.split(path.sep).join(path.posix.sep);
Expand Down Expand Up @@ -76,7 +77,7 @@ const commonConfig = (env) => {
transpileOnly,
compilerOptions: {
...importsNotUsedAsValues,
sourceMap: sourceMaps,
sourceMap: sourceMaps
},
},
},
Expand Down Expand Up @@ -118,8 +119,7 @@ const commonConfig = (env) => {
alias: {
"react": path.resolve('./node_modules/react'),
"react-dom": path.resolve('./node_modules/react-dom'),
"@patternfly/react-core": path.resolve('./node_modules/@patternfly/react-core'),
"@patternfly/react-topology": path.resolve('./node_modules/@patternfly/react-topology')
"@patternfly/react-core": path.resolve('./node_modules/@patternfly/react-core')
},
},
plugins: [
Expand All @@ -131,6 +131,14 @@ const commonConfig = (env) => {
},
]
}),
new RemovePlugin({
before: {
// Workaround to https://github.com/patternfly/react-topology/issues/118
include: [
'node_modules/@patternfly/react-topology/dist/esm/css/index.ts'
]
}
})
],
externals: {
vscode: "commonjs vscode",
Expand Down
Loading

0 comments on commit b67c70b

Please sign in to comment.