Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Stop using the fast-async babel plugin #790

Merged
merged 1 commit into from
Apr 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/customization/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ module.exports = {
}],

['@neutrinojs/react', {
polyfills: { async: false },
html: { title: 'Epic React App' }
}],

Expand Down
2 changes: 1 addition & 1 deletion docs/middleware/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ module.exports = {
'@neutrinojs/airbnb-base',

// array format
['@neutrinojs/react', { polyfills: { async: false } }],
['@neutrinojs/react', html: { title: 'Epic React App' } }],

// function format
(neutrino) => {
Expand Down
5 changes: 0 additions & 5 deletions docs/packages/library/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,6 @@ module.exports = {
// such as whitelisting dependencies for bundling.
externals: {},

polyfills: {
// Enables fast-async polyfill. Set to false to disable
async: true
},

// Remove the contents of the output directory prior to building.
// Set to false to disable cleaning this directory
clean: {
Expand Down
8 changes: 0 additions & 8 deletions docs/packages/node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,6 @@ module.exports = {
// Enables Hot Module Replacement. Set to false to disable
hot: true,

polyfills: {
// Enables fast-async polyfill. Set to false to disable
async: true
},

// Target specific versions via babel-preset-env
targets: {
node: '6.10'
Expand All @@ -280,9 +275,6 @@ module.exports = {
targets: { node: '6.10' },
modules: false,
useBuiltIns: true,
// These are excluded when using polyfills.async. Disabling the async polyfill
// will remove these from the exclusion list
exclude: ['transform-regenerator', 'transform-async-to-generator']
}]
]
}
Expand Down
1 change: 0 additions & 1 deletion docs/packages/preact/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ module.exports = {
['babel-preset-env', {
modules: false,
useBuiltIns: true,
exclude: ['transform-regenerator', 'transform-async-to-generator'],
}]
]
}
Expand Down
1 change: 0 additions & 1 deletion docs/packages/react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ module.exports = {
['babel-preset-env', {
modules: false,
useBuiltIns: true,
exclude: ['transform-regenerator', 'transform-async-to-generator'],
}]
]
}
Expand Down
1 change: 0 additions & 1 deletion docs/packages/vue/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ module.exports = {
['babel-preset-env', {
modules: false,
useBuiltIns: true,
exclude: ['transform-regenerator', 'transform-async-to-generator'],
}]
]
}
Expand Down
6 changes: 0 additions & 6 deletions docs/packages/web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,6 @@ module.exports = {
// Enables Hot Module Replacement. Set to false to disable
hot: true,

polyfills: {
// Enables fast-async polyfill. Set to false to disable
async: true
},

// Sets webpack's `output.publicPath` and
// `devServer.publicPath` settings. Useful if you want to
// serve assets from a non-root location (e.g. `/assets/`)
Expand Down Expand Up @@ -253,7 +248,6 @@ module.exports = {
['babel-preset-env', {
modules: false,
useBuiltIns: true,
exclude: ['transform-regenerator', 'transform-async-to-generator'],
}]
]
}
Expand Down
5 changes: 0 additions & 5 deletions packages/library/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,6 @@ module.exports = {
// such as whitelisting dependencies for bundling.
externals: {},

polyfills: {
// Enables fast-async polyfill. Set to false to disable
async: true
},

// Remove the contents of the output directory prior to building.
// Set to false to disable cleaning this directory
clean: {
Expand Down
5 changes: 0 additions & 5 deletions packages/library/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ module.exports = (neutrino, opts = {}) => {
const options = merge({
target: 'web',
libraryTarget: 'umd',
polyfills: {
async: true
},
babel: {},
clean: opts.clean !== false && {
paths: [neutrino.options.output]
Expand All @@ -30,7 +27,6 @@ module.exports = (neutrino, opts = {}) => {
Object.assign(options, {
babel: compileLoader.merge({
plugins: [
...(options.polyfills.async ? [[require.resolve('fast-async'), { spec: true }]] : []),
options.target === 'node' ?
require.resolve('babel-plugin-dynamic-import-node') :
require.resolve('babel-plugin-syntax-dynamic-import')
Expand All @@ -40,7 +36,6 @@ module.exports = (neutrino, opts = {}) => {
debug: neutrino.options.debug,
modules: false,
useBuiltIns: true,
exclude: options.polyfills.async ? ['transform-regenerator', 'transform-async-to-generator'] : [],
targets: options.target === 'node' ?
{ node: '6.10' } :
{ browsers: [] }
Expand Down
1 change: 0 additions & 1 deletion packages/library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-preset-env": "^1.6.0",
"deepmerge": "^1.5.2",
"fast-async": "^6.3.0",
"webpack": "^3.10.0",
"webpack-node-externals": "^1.6.0",
"webpack-sources": "1.0.1",
Expand Down
8 changes: 0 additions & 8 deletions packages/node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,6 @@ module.exports = {
// Enables Hot Module Replacement. Set to false to disable
hot: true,

polyfills: {
// Enables fast-async polyfill. Set to false to disable
async: true
},

// Target specific versions via babel-preset-env
targets: {
node: '6.10'
Expand All @@ -280,9 +275,6 @@ module.exports = {
targets: { node: '6.10' },
modules: false,
useBuiltIns: true,
// These are excluded when using polyfills.async. Disabling the async polyfill
// will remove these from the exclusion list
exclude: ['transform-regenerator', 'transform-async-to-generator']
}]
]
}
Expand Down
7 changes: 1 addition & 6 deletions packages/node/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ module.exports = (neutrino, opts = {}) => {
);
const options = merge({
hot: true,
polyfills: {
async: true
},
targets: {
node: '6.10'
},
Expand All @@ -49,16 +46,14 @@ module.exports = (neutrino, opts = {}) => {
exclude: [staticDir],
babel: compile.merge({
plugins: [
...(options.polyfills.async ? [[require.resolve('fast-async'), { spec: true }]] : []),
require.resolve('babel-plugin-dynamic-import-node')
],
presets: [
[require.resolve('babel-preset-env'), {
debug: neutrino.options.debug,
targets: options.targets,
modules: false,
useBuiltIns: true,
exclude: options.polyfills.async ? ['transform-regenerator', 'transform-async-to-generator'] : []
useBuiltIns: true
}]
]
}, options.babel)
Expand Down
1 change: 0 additions & 1 deletion packages/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"babel-plugin-dynamic-import-node": "^1.2.0",
"babel-preset-env": "^1.6.0",
"deepmerge": "^1.5.2",
"fast-async": "^6.3.0",
"ramda": "^0.25.0",
"webpack": "^3.10.0",
"webpack-node-externals": "^1.6.0",
Expand Down
1 change: 0 additions & 1 deletion packages/preact/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ module.exports = {
['babel-preset-env', {
modules: false,
useBuiltIns: true,
exclude: ['transform-regenerator', 'transform-async-to-generator'],
}]
]
}
Expand Down
1 change: 0 additions & 1 deletion packages/react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ module.exports = {
['babel-preset-env', {
modules: false,
useBuiltIns: true,
exclude: ['transform-regenerator', 'transform-async-to-generator'],
}]
]
}
Expand Down
1 change: 0 additions & 1 deletion packages/vue/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ module.exports = {
['babel-preset-env', {
modules: false,
useBuiltIns: true,
exclude: ['transform-regenerator', 'transform-async-to-generator'],
}]
]
}
Expand Down
6 changes: 0 additions & 6 deletions packages/web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,6 @@ module.exports = {
// Enables Hot Module Replacement. Set to false to disable
hot: true,

polyfills: {
// Enables fast-async polyfill. Set to false to disable
async: true
},

// Sets webpack's `output.publicPath` and
// `devServer.publicPath` settings. Useful if you want to
// serve assets from a non-root location (e.g. `/assets/`)
Expand Down Expand Up @@ -253,7 +248,6 @@ module.exports = {
['babel-preset-env', {
modules: false,
useBuiltIns: true,
exclude: ['transform-regenerator', 'transform-async-to-generator'],
}]
]
}
Expand Down
5 changes: 0 additions & 5 deletions packages/web/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ module.exports = (neutrino, opts = {}) => {
hot: true,
hotEntries: [],
html: {},
polyfills: {
async: true
},
devServer: {
hot: opts.hot !== false,
publicPath: resolve('/', publicPath)
Expand Down Expand Up @@ -88,15 +85,13 @@ module.exports = (neutrino, opts = {}) => {
}),
babel: compileLoader.merge({
plugins: [
...(options.polyfills.async ? [[require.resolve('fast-async'), { spec: true }]] : []),
require.resolve('babel-plugin-syntax-dynamic-import')
],
presets: [
[require.resolve('babel-preset-env'), {
debug: neutrino.options.debug,
modules: false,
useBuiltIns: true,
exclude: options.polyfills.async ? ['transform-regenerator', 'transform-async-to-generator'] : [],
targets: options.targets
}]
]
Expand Down
1 change: 0 additions & 1 deletion packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-preset-env": "^1.6.0",
"deepmerge": "^1.5.2",
"fast-async": "^6.3.0",
"webpack": "^3.10.0",
"webpack-manifest-plugin": "^2.0.0",
"webpack-sources": "1.0.1",
Expand Down
Loading