Skip to content

Commit

Permalink
fix: fix errors on parcel 1.12.3 (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
goodmind authored and satya164 committed Mar 27, 2019
1 parent 16a597a commit ebc71c7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"release": "release-it"
},
"dependencies": {
"parcel-bundler": "^1.11.0"
"parcel-bundler": "^1.12.3"
},
"devDependencies": {
"@babel/core": "^7.3.3",
Expand Down
17 changes: 8 additions & 9 deletions src/LinariaAsset.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,20 @@ class LinariaAsset extends JSAsset {
}

async generate() {
const { cssText } = this[RESULT];
const output = (await super.generate()) || {};
const { cssText, sourceMap } = this[RESULT];
const output = (await super.generate()) || [];

const result = [
{
type: 'js',
value: output.js,
sourceMap: output.map,
},
];
const result = output.map(value => ({
type: value.type,
value: value.value,
sourceMap: value.map,
}))

if (cssText) {
result.push({
type: 'css',
value: cssText,
sourceMap,
final: true,
});

Expand Down

0 comments on commit ebc71c7

Please sign in to comment.