diff --git a/demo/webpack.config.ts b/demo/webpack.config.ts index 9fef0db0..551ba557 100644 --- a/demo/webpack.config.ts +++ b/demo/webpack.config.ts @@ -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$/), diff --git a/package.json b/package.json index 92c7b967..ece64a52 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/yarn.lock b/yarn.lock index 64bf4fa0..037c8fe7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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"