Skip to content

Commit

Permalink
feat: add config-dep test case
Browse files Browse the repository at this point in the history
  • Loading branch information
sanyuan0704 committed Nov 21, 2021
1 parent a96d366 commit eab1d38
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/playground/resolve/config-dep.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
a: 1
}
4 changes: 4 additions & 0 deletions packages/playground/resolve/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@ const virtualFile = '@virtual-file'
const virtualId = '\0' + virtualFile

const customVirtualFile = '@custom-virtual-file'
const { a } = require('./config-dep');

module.exports = {
resolve: {
extensions: ['.mjs', '.js', '.es', '.ts'],
mainFields: ['custom', 'module'],
conditions: ['custom']
},
define: {
VITE_CONFIG_DEP_TEST: a
},
plugins: [
{
name: 'virtual-module',
Expand Down

0 comments on commit eab1d38

Please sign in to comment.