forked from rollup/plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into fix/sucrase-aliased-imports
# By Tiger Oakes (2) and others # Via GitHub * master: feat(wasm): Switch to TypeScript & named exports (rollup#363) feat(node-resolve): Add default export (rollup#361) fix (sucrase): resolve directory imports (rollup#390) docs(typescript): update readme examples (rollup#391) # Conflicts: # packages/sucrase/test/snapshots/test.js.md # packages/sucrase/test/snapshots/test.js.snap # packages/sucrase/test/test.js # pnpm-lock.yaml
- Loading branch information
Showing
21 changed files
with
163 additions
and
46 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
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
1 change: 1 addition & 0 deletions
1
packages/sucrase/test/fixtures/typescript-resolve-directory/example-a/index.ts
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 @@ | ||
export default (a: number, b: number): number => a * b; |
1 change: 1 addition & 0 deletions
1
packages/sucrase/test/fixtures/typescript-resolve-directory/example-b.ts
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 @@ | ||
export default (c: number, d: number): number => c * d; |
1 change: 1 addition & 0 deletions
1
packages/sucrase/test/fixtures/typescript-resolve-directory/example-b/index.ts
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 @@ | ||
export default 'Should not be imported'; |
5 changes: 5 additions & 0 deletions
5
packages/sucrase/test/fixtures/typescript-resolve-directory/main.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import dirImport from './example-a'; | ||
import fileImport from './example-b'; | ||
|
||
t.snapshot(dirImport.toString()); | ||
t.snapshot(fileImport.toString()); |
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
Binary file not shown.
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
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
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,13 +1,10 @@ | ||
const { builtinModules } = require('module'); | ||
import typescript from '@rollup/plugin-typescript'; | ||
|
||
const pkg = require('./package.json'); | ||
import { createConfig } from '../../shared/rollup.config'; | ||
|
||
const dependencies = Object.keys(pkg.dependencies || {}); | ||
import pkg from './package.json'; | ||
|
||
export default [ | ||
{ | ||
input: 'src/index.js', | ||
output: { exports: 'named', file: 'dist/index.js', format: 'cjs' }, | ||
external: [...builtinModules, ...dependencies] | ||
} | ||
]; | ||
export default { | ||
...createConfig(pkg), | ||
plugins: [typescript()] | ||
}; |
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
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,14 @@ | ||
import { Plugin } from 'rollup'; | ||
|
||
export interface RollupWasmOptions { | ||
/** | ||
* Specifies an array of strings that each represent a WebAssembly file to load synchronously. | ||
*/ | ||
sync?: readonly string[]; | ||
} | ||
|
||
/** | ||
* 🍣 A Rollup which allows importing and bundling [WebAssembly modules](http://webassembly.org). | ||
*/ | ||
export function wasm(options?: RollupWasmOptions): Plugin; | ||
export default wasm; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.