Skip to content

Commit

Permalink
refactor: code
Browse files Browse the repository at this point in the history
  • Loading branch information
cap-Bernardito committed Jul 12, 2021
1 parent 8a26186 commit 12cbd31
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,15 @@ loaderAPI.pitch = function loader(request) {
const { styleTagTransform } = options;
const esModule =
typeof options.esModule !== "undefined" ? options.esModule : true;
const runtimeOptions = {
injectType: options.injectType,
attributes: options.attributes,
insert: options.insert,
base: options.base,
};
const runtimeOptions = {};

if (options.attributes) {
runtimeOptions.attributes = options.attributes;
}

if (options.base) {
runtimeOptions.base = options.base;
}

const insertFn = insertIsFunction
? options.insert.toString()
Expand Down

0 comments on commit 12cbd31

Please sign in to comment.