Skip to content
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

Ignore resolve requests that start with ! #1359

Merged
merged 2 commits into from
Feb 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/webpack/src/webpack-resolver-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ class WebpackModuleRequest implements ModuleRequest {
typeof state.context === 'string' &&
typeof state.contextInfo?.issuer === 'string' &&
state.contextInfo.issuer !== '' &&
!state.request.startsWith(virtualLoaderName) // prevents recursion on requests we have already sent to our virtual loader
!state.request.startsWith(virtualLoaderName) && // prevents recursion on requests we have already sent to our virtual loader
!state.request.startsWith('!') // ignores internal webpack resolvers
) {
return new WebpackModuleRequest(state);
}
Expand Down
2 changes: 2 additions & 0 deletions tests/scenarios/v2-addon-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ appScenarios
import Component from '@glimmer/component';
import { hbs } from 'ember-cli-htmlbars';
import { setComponentTemplate } from '@ember/component';
import './example-component.css';
const TEMPLATE = hbs('<div data-test-example>{{this.message}}</div>')
export default class ExampleComponent extends Component {
message = "it worked"
}
setComponentTemplate(TEMPLATE, ExampleComponent);
`,
'example-component.css': '/* not empty */ h1 { color: red }',
},
'import-from-npm.js': `
export default async function() {
Expand Down