-
Notifications
You must be signed in to change notification settings - Fork 139
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
Add test for v2 addon importing from v1 addon's fake module #1101
base: main
Are you sure you want to change the base?
Add test for v2 addon importing from v1 addon's fake module #1101
Conversation
Either way this will be good to keep in the test suite. |
I think your original bug may have been around |
yeah, I have a couple things I'm trying to reproduce: from here: https://github.com/NullVoxPopuli/ember-addon-v2-typescript-demo from here: NullVoxPopuli/ember-resources#366 |
I was playing with ember-addon-v2-typescript-demo and figured out that When logging If I change the dist files to EDIT: That setup was not using embroider actually, just ember-auto-import. |
The problem in that demo repo is: When webpack sees that it gets Very Strict with your module, including disabling things like interoperability between But we need the interoperability, because in a classic build (which is what that repo is using), Under Embroider things are different, because webpack will see |
I think you can use Rule.type to override webpack's behavior here and go back from |
ah, interesting -- I hadn't heard of rule.type before. Changing my config in the test app to this has everything working with @josemarluedke's addon-dev changes. 🎉 updated emebr-cli-build.js'use strict';
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
module.exports = function (defaults) {
let app = new EmberApp(defaults, {
autoImport: {
watchDependencies: [Object.keys(require('./package').dependencies)],
webpack: {
devtool: 'inline-source-map',
module: {
rules: [{ test: /\.(js|ts)$/, type: 'javascript/auto' }],
},
},
},
});
const { maybeEmbroider } = require('@embroider/test-setup');
return maybeEmbroider(app, {
packagerOptions: {
webpackConfig: {
devtool: 'inline-source-map',
module: {
rules: [{ test: /\.(js|ts)$/, type: 'javascript/auto' }],
},
},
},
});
}; Some followup questions though -- and maybe "elsewhere" is more appropriate for this sort of discussion, but idk:
does the problem go away if we convert
does a PR to flip to the defaults to |
…AMD interop with ember stuff), see: embroider-build/embroider#1101 (comment)
f7d8a31
to
fd94c6e
Compare
f468bd1
to
4f5d507
Compare
This added test is to try to recreate some troubles I've been experiencing with
@glimmer/tracking/primitives/cache
#1020The end goal is to reproduce the problem in embroider's test suite, so I can debug what's going on a little easier.