Skip to content

Commit

Permalink
always use / filename to get name and namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
danjunger committed Dec 11, 2024
1 parent d10cdb0 commit 7b11aae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/@lwc/rollup-plugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ export default function lwc(pluginOptions: RollupLwcOptions = {}): Plugin {
// Specifier will only exist for modules with alias paths.
// Otherwise, use the file directory structure to resolve namespace and name.
const [namespace, name] =
specifier?.split('/') ?? path.dirname(filename).split(path.sep).slice(-2);
specifier?.split('/') ?? path.dirname(filename).split('/').slice(-2);

const apiVersionToUse = getAPIVersionFromNumber(apiVersion);

Expand Down

0 comments on commit 7b11aae

Please sign in to comment.