chore: fix benchmark crashing

This commit is contained in:
Roman Hotsiy 2018-10-18 10:40:26 +03:00
parent a4a40135ec
commit 477c01a9de
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0
3 changed files with 17 additions and 1 deletions

View File

@ -36,6 +36,7 @@ const babelLoader = mode => ({
plugins: compact([
['@babel/plugin-syntax-typescript', { isTSX: true }],
['@babel/plugin-syntax-decorators', { legacy: true }],
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-syntax-jsx',
mode !== 'production' ? 'react-hot-loader/babel' : undefined,
[
@ -132,7 +133,11 @@ export default (env: { playground?: boolean; bench?: boolean } = {}, { mode }) =
new webpack.NamedModulesPlugin(),
new webpack.optimize.ModuleConcatenationPlugin(),
new HtmlWebpackPlugin({
template: env.playground ? 'demo/playground/index.html' : 'demo/index.html',
template: env.playground
? 'demo/playground/index.html'
: env.bench
? 'benchmark/index.html'
: 'demo/index.html',
}),
new ForkTsCheckerWebpackPlugin(),
ignore(/js-yaml\/dumper\.js$/),

View File

@ -53,6 +53,7 @@
"devDependencies": {
"@babel/core": "7.0.0-rc.2",
"@babel/plugin-syntax-decorators": "7.0.0-rc.2",
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/plugin-syntax-jsx": "7.0.0-rc.2",
"@babel/plugin-syntax-typescript": "7.0.0-rc.2",
"@cypress/webpack-preprocessor": "2.0.1",

View File

@ -67,6 +67,10 @@
version "7.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0-rc.2.tgz#95bc3225bf6aeda5a5ebc90af2546b5b9317c0b4"
"@babel/helper-plugin-utils@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250"
"@babel/helper-split-export-declaration@7.0.0-rc.2":
version "7.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-rc.2.tgz#726b2dec4e46baeab32db67caa6e88b6521464f8"
@ -107,6 +111,12 @@
dependencies:
"@babel/helper-plugin-utils" "7.0.0-rc.2"
"@babel/plugin-syntax-dynamic-import@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.0.0.tgz#6dfb7d8b6c3be14ce952962f658f3b7eb54c33ee"
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-jsx@7.0.0-rc.2":
version "7.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.0.0-rc.2.tgz#c070fd6057ad85c43ba4e7819723e28e760824ff"