-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot find module package.json #19
Comments
This error persists even after changing the configuration to the new style. For now we are downgrading back to 0.3.1. |
Thanks for report guys. Let's try to resolve it. new configurationThere where changes in configuration, do you followed this? -babelOptions.plugins.push([FilterImports, strippedImports]);
+babelOptions.plugins.push([FilterImports, {
imports: strippedImports
}]); New version of plugin also removes imports, you can to do this: -babelOptions.plugins.push([FilterImports, strippedImports]);
-babelOptions.plugins.push([RemoveImports, 'ember-attacher/-debug/helpers']);
+babelOptions.plugins.push([FilterImports, {
+ keepImports: false,
+ imports: strippedImports
+}]); ES6 exportsYou're requiering module as CommonJS, but this plugin was rewritten in ES6, so you need to make following change: -const FilterImports = require('babel-plugin-filter-imports');
+const FilterImports = require('babel-plugin-filter-imports').default; Can you try to make these changes? |
@layershifter it works! Looks like something is a bit off though, getting a giant warning message from
|
@layershifter Thanks for your help! It's really appreciated. I'm wondering if the new syntax documented somewhere? Because it's not on the README and it feels like having it there would've prevented this whole hiccup 😆 I'm not a great technical writer, but let me know if you could use my help here |
Thanks for the feedback. It seems that I need to restore CommonJS export. I've made a branch with it, can you grab code from there and test? Your import should be also restored to: const FilterImports = require('babel-plugin-filter-imports'); |
Hey @layershifter, I'm seeing the same error as originally posted with the given branch, regardless of using I'm using the following entry in ember-attacher's package.json:
|
@kybishop can you make a manual for me? How I can test it? Possible minimal repo or something another? |
@layershifter I just pushed my WIP branch for updating babel-plugin-filter-imports: https://github.com/kybishop/ember-attacher/tree/update-babel-plugin-filter-imports You can test with |
@kybishop Can you check the latest? As I see it works fine and I make cleanups and release patch.
BTW, thanks for the cooperation and patience 👍 |
Success! Thanks @layershifter |
Released in |
I'm seeing this weird issue on v1.0.3. It's not reproducible on v0.3.1
The integration code is here, which looks perfectly normal to me:
https://github.com/kybishop/ember-attacher/blob/a2f1cd0850c4afc6b371cf121ff35138e4c0eca3/index.js#L35-L43
Any help would be appreciated. Thanks
The text was updated successfully, but these errors were encountered: