-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(esbuild): minify exposes target config for es5 projects (#571)
* fix(esbuild): minify using es5 * chore: fix targets * chore: test case * chore: test case * chore: test case * chore: setTimeout * chore: esbuild * chore: target array or string * chore: es5
- Loading branch information
Showing
5 changed files
with
71 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
export default { | ||
nodeModulesTransform: { | ||
type: 'none', | ||
}, | ||
targets: { | ||
ie: 11, | ||
}, | ||
history: { | ||
type: 'memory', | ||
options: { | ||
initialEntries: ['/'], | ||
}, | ||
}, | ||
mountElementId: '', | ||
routes: [ | ||
{ path: '/', component: 'index' }, | ||
], | ||
esbuild: { | ||
target: 'es5', | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default () => { | ||
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.") | ||
} |
4 changes: 3 additions & 1 deletion
4
packages/plugin-esbuild/src/fixtures/normal/src/pages/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import React from 'react'; | ||
|
||
export default () => <div>Hello</div> | ||
export default () => { | ||
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters