Skip to content

Commit

Permalink
Fixed issue with empty asset (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksSavelev authored Nov 29, 2022
1 parent 477d6f2 commit 9efde17
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
14 changes: 9 additions & 5 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,20 @@

This page contains information about changes to the **PowerBI-visuals-webpack-plugin**.

## 3.1.2

* Fixed bug when css asset wasn't generated

## 3.1.1

* fixed double webpack compilation
* removed non-personal environment logging
* updated deprecated methods
* Fixed double webpack compilation
* Removed non-personal environment logging
* Updated deprecated methods

## 3.0.0

* refactored assets compilation due to latest webpack rules
* added non-personal environment logging
* Refactored assets compilation due to latest webpack rules
* Added non-personal environment logging

## 2.3.1

Expand Down
6 changes: 3 additions & 3 deletions extractor/js.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ const appendExternalJS = async function (externalJS) {
).then((results) => results.join(""));
};

module.exports = async function (options, compilation) {
module.exports = async function (options, { assets }) {
let chunkContent;
const sourcePromises = [];

for (let asset in compilation.assets) {
for (let asset in assets) {
const extension = asset.split(".").pop();
if (extension === "js") {
chunkContent = compilation.assets[asset].source();
chunkContent = assets[asset].source();
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class PowerBICustomVisualsWebpackPlugin {
updateAssets(compilation) {
Object.keys(this.assets).forEach((name) => {
const value = this.assets[name];
if (!value) {
if (value === undefined) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "powerbi-visuals-webpack-plugin",
"version": "3.1.1",
"version": "3.1.2",
"description": "PowerBI Custom Visuals webpack plugin",
"main": "index.js",
"keywords": [
Expand Down

0 comments on commit 9efde17

Please sign in to comment.