Skip to content

Commit

Permalink
fix: revert #6233, strip query when resolving entry (fix #6797)
Browse files Browse the repository at this point in the history
This reverts commit 000ba2e.
  • Loading branch information
patak-dev committed Feb 7, 2022
1 parent 487c1d1 commit a012644
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 16 deletions.
1 change: 0 additions & 1 deletion packages/playground/vue/ExternalStyleCss.vue

This file was deleted.

2 changes: 0 additions & 2 deletions packages/playground/vue/Main.vue
Expand Up @@ -20,7 +20,6 @@
</Suspense>
<ReactivityTransform :foo="time" />
<SetupImportTemplate />
<ExternalStyleCss />
</template>

<script setup lang="ts">
Expand All @@ -36,7 +35,6 @@ import ScanDep from './ScanDep.vue'
import AsyncComponent from './AsyncComponent.vue'
import ReactivityTransform from './ReactivityTransform.vue'
import SetupImportTemplate from './setup-import-template/SetupImportTemplate.vue'
import ExternalStyleCss from './ExternalStyleCss.vue'
import { ref } from 'vue'
Expand Down
3 changes: 1 addition & 2 deletions packages/playground/vue/package.json
Expand Up @@ -18,7 +18,6 @@
"less": "^4.1.2",
"pug": "^3.0.2",
"sass": "^1.43.4",
"stylus": "^0.55.0",
"css-with-exports-field": "^1.0.0"
"stylus": "^0.55.0"
}
}
5 changes: 0 additions & 5 deletions packages/vite/src/node/plugins/resolve.ts
Expand Up @@ -802,11 +802,6 @@ function resolveDeepImport(
targetWeb: boolean,
options: InternalResolveOptions
): string | undefined {
// id might contain ?query
// e.g. when using `<style src="some-pkg/dist/style.css"></style>` in .vue file
// the id will be ./dist/style.css?vue&type=style&index=0&src=xxx&lang.css
id = id.split('?')[0]

const cache = getResolvedCache(id, targetWeb)
if (cache) {
return cache
Expand Down
6 changes: 0 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a012644

Please sign in to comment.