mirror of
https://github.com/developit/microbundle.git
synced 2026-01-18 13:56:35 +00:00
Merge branch 'master' into fix/hoisted-packages
This commit is contained in:
commit
a474f417dc
@ -48,7 +48,7 @@
|
||||
"@babel/polyfill": "^7.0.0",
|
||||
"asyncro": "^3.0.0",
|
||||
"autoprefixer": "^9.0.0",
|
||||
"babel-plugin-transform-async-to-promises": "^0.8.1",
|
||||
"babel-plugin-transform-async-to-promises": "^0.8.3",
|
||||
"brotli-size": "^0.0.3",
|
||||
"camelcase": "^5.0.0",
|
||||
"chalk": "^2.4.0",
|
||||
|
||||
@ -373,7 +373,7 @@ function createConfig(options, entry, format, writeMeta) {
|
||||
},
|
||||
tsconfigOverride: {
|
||||
compilerOptions: {
|
||||
target: 'es2017',
|
||||
target: 'esnext',
|
||||
},
|
||||
},
|
||||
}),
|
||||
@ -385,6 +385,7 @@ function createConfig(options, entry, format, writeMeta) {
|
||||
// supplied configurations we set this option to false. Note
|
||||
// that we never supported using custom babel configs anyway.
|
||||
babelrc: false,
|
||||
extensions: ['.ts', '.tsx', '.js', '.jsx', '.es6', '.es', '.mjs'],
|
||||
exclude: 'node_modules/**',
|
||||
plugins: [
|
||||
require.resolve('@babel/plugin-syntax-jsx'),
|
||||
|
||||
@ -1,5 +1,63 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`fixtures async-iife-ts 1`] = `
|
||||
"Used script: microbundle
|
||||
|
||||
Directory tree:
|
||||
|
||||
async-iife-ts
|
||||
dist
|
||||
async-iife-ts.js
|
||||
async-iife-ts.js.map
|
||||
async-iife-ts.mjs
|
||||
async-iife-ts.mjs.map
|
||||
async-iife-ts.umd.js
|
||||
async-iife-ts.umd.js.map
|
||||
index.d.ts
|
||||
package.json
|
||||
src
|
||||
index.ts
|
||||
tsconfig.json
|
||||
|
||||
|
||||
Build \\"asyncIifeTs\\" to dist:
|
||||
93 B: async-iife-ts.js.gz
|
||||
74 B: async-iife-ts.js.br
|
||||
93 B: async-iife-ts.mjs.gz
|
||||
74 B: async-iife-ts.mjs.br
|
||||
164 B: async-iife-ts.umd.js.gz
|
||||
123 B: async-iife-ts.umd.js.br"
|
||||
`;
|
||||
|
||||
exports[`fixtures async-ts 1`] = `
|
||||
"Used script: microbundle
|
||||
|
||||
Directory tree:
|
||||
|
||||
async-ts
|
||||
dist
|
||||
async-ts.js
|
||||
async-ts.js.map
|
||||
async-ts.mjs
|
||||
async-ts.mjs.map
|
||||
async-ts.umd.js
|
||||
async-ts.umd.js.map
|
||||
index.d.ts
|
||||
package.json
|
||||
src
|
||||
index.ts
|
||||
tsconfig.json
|
||||
|
||||
|
||||
Build \\"asyncTs\\" to dist:
|
||||
158 B: async-ts.js.gz
|
||||
122 B: async-ts.js.br
|
||||
160 B: async-ts.mjs.gz
|
||||
128 B: async-ts.mjs.br
|
||||
245 B: async-ts.umd.js.gz
|
||||
202 B: async-ts.umd.js.br"
|
||||
`;
|
||||
|
||||
exports[`fixtures basic 1`] = `
|
||||
"Used script: microbundle
|
||||
|
||||
@ -310,12 +368,12 @@ esnext-ts
|
||||
|
||||
|
||||
Build \\"esnextTs\\" to dist:
|
||||
470 B: esnext-ts.js.gz
|
||||
404 B: esnext-ts.js.br
|
||||
470 B: esnext-ts.mjs.gz
|
||||
409 B: esnext-ts.mjs.br
|
||||
528 B: esnext-ts.umd.js.gz
|
||||
461 B: esnext-ts.umd.js.br"
|
||||
841 B: esnext-ts.js.gz
|
||||
753 B: esnext-ts.js.br
|
||||
842 B: esnext-ts.mjs.gz
|
||||
751 B: esnext-ts.mjs.br
|
||||
902 B: esnext-ts.umd.js.gz
|
||||
804 B: esnext-ts.umd.js.br"
|
||||
`;
|
||||
|
||||
exports[`fixtures jsx 1`] = `
|
||||
|
||||
3
test/fixtures/async-iife-ts/package.json
vendored
Normal file
3
test/fixtures/async-iife-ts/package.json
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"name": "async-iife-ts"
|
||||
}
|
||||
3
test/fixtures/async-iife-ts/src/index.ts
vendored
Normal file
3
test/fixtures/async-iife-ts/src/index.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
(async function() {
|
||||
console.log('foo');
|
||||
})();
|
||||
5
test/fixtures/async-iife-ts/tsconfig.json
vendored
Normal file
5
test/fixtures/async-iife-ts/tsconfig.json
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src"
|
||||
}
|
||||
}
|
||||
3
test/fixtures/async-ts/package.json
vendored
Normal file
3
test/fixtures/async-ts/package.json
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"name": "async-ts"
|
||||
}
|
||||
3
test/fixtures/async-ts/src/index.ts
vendored
Normal file
3
test/fixtures/async-ts/src/index.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
export class MyClass {
|
||||
async foo() {}
|
||||
}
|
||||
5
test/fixtures/async-ts/tsconfig.json
vendored
Normal file
5
test/fixtures/async-ts/tsconfig.json
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src"
|
||||
}
|
||||
}
|
||||
4
test/fixtures/esnext-ts/src/index.ts
vendored
4
test/fixtures/esnext-ts/src/index.ts
vendored
@ -1,10 +1,10 @@
|
||||
export default async function foo() {
|
||||
const out = [];
|
||||
for await (const item of [1,2]) {
|
||||
for await (const item of [1, 2]) {
|
||||
out.push(item);
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
foo().then(console.log)
|
||||
foo().then(console.log);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user