Skip to content

Rollup cannot interpret the @__PURE__ annotation #85

@andrzejkupczyk

Description

@andrzejkupczyk

node_modules/.pnpm/@Wikia+post-quecast@2.0.1/node_modules/@wikia/post-quecast/dist/module/index.js (16:15)

A comment "/@PURE/" in "node_modules/.pnpm/@Wikia+post-quecast@2.0.1/node_modules/@wikia/post-quecast/dist/module/index.js" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.

/**
* Adds @__PURE__ to every instance (class, const method etc.) to allow tree shaking
* @returns {{renderChunk(string): {code: string, map: null}}}
*/
export function markAsPure() {
return {
renderChunk(code) {
return {
code: code.replace(/^(var .+) = /gm, match => match.replace(' = ', ' = /*@__PURE__*/ ')),
map: null,
};
},
};
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions