Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for webpack 4 themes generation error on Windows #590

Merged
merged 1 commit into from
May 24, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix for webpack 4 themes generation error on Windows
  • Loading branch information
texodus committed May 24, 2019
commit 466a1910f139b0721de9065c7ae0dfdb2d00483e
7 changes: 5 additions & 2 deletions packages/perspective-viewer/src/config/themes.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ module.exports = Object.assign({}, common(), {
}),
new WebpackOnBuildPlugin(() => {
for (const theme of THEMES) {
fs.unlinkSync(path.resolve(__dirname, "..", "..", "build", theme.replace("less", "js")));
const filePath = path.resolve(__dirname, "..", "..", "build", theme.replace("less", "js"));
if (fs.existsSync(filePath)) {
fs.unlinkSync(filePath);
}
}
})
],
Expand All @@ -38,7 +41,7 @@ module.exports = Object.assign({}, common(), {
loader: "base64-font-loader"
},
{
test: /themes\/.+?\.less$/,
test: /themes[\\/].+?\.less$/,
use: [{loader: MiniCssExtractPlugin.loader}, "css-loader", "less-loader"]
}
]
Expand Down