babel-plugin-filter-imports icon indicating copy to clipboard operation
babel-plugin-filter-imports copied to clipboard

Bug: cannot find path for removal

Open lgraziani2712 opened this issue 6 years ago • 0 comments

Hi! This is a really dope plugin!!

Today I faced the following issue: Cannot find the path for removal, please open issue with code example and the stack trace on Github: https://github.com/ember-cli/babel-plugin-filter-imports

It happened with the following code:

import VueTypes from "vue-types";

const props = {
  name: VueTypes.string.isRequired
};

export default {
  name: "App",
  props,
};

The following code works:

import VueTypes from "vue-types";

let props;

props = {
  name: VueTypes.string.isRequired
};

export default {
  name: "App",
  props,
};

Repro code: https://codesandbox.io/s/rrno774wq4

Thank you!

lgraziani2712 avatar Mar 02 '19 21:03 lgraziani2712