Skip to content

Commit 4372600

Browse files
author
Ives van Hoorne
committed
Remove concatenation plugin, because it causes errors
1 parent 60e13a6 commit 4372600

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

config/webpack.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,6 @@ if (__DEV__) {
259259
if (__PROD__) {
260260
config.plugins = [
261261
...config.plugins,
262-
new webpack.optimize.ModuleConcatenationPlugin(),
263262
// Minify the code.
264263
new webpack.LoaderOptionsPlugin({
265264
minimize: true,

src/sandbox/eval/js/babel-parser.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// @flow
22
import type { Module, Directory } from 'common/types';
33

4-
import 'babel-plugin-transform-async-to-generator';
5-
import 'babel-plugin-transform-object-rest-spread';
6-
import 'babel-plugin-transform-class-properties';
7-
import 'babel-plugin-transform-decorators-legacy';
4+
import asyncPlugin from 'babel-plugin-transform-async-to-generator';
5+
import restSpreadPlugin from 'babel-plugin-transform-object-rest-spread';
6+
import classPropertiesPlugin from 'babel-plugin-transform-class-properties';
7+
import decoratorsPlugin from 'babel-plugin-transform-decorators-legacy';
88

99
import evalModule from '../';
1010
import resolveDependency from './dependency-resolver';
@@ -15,10 +15,10 @@ const CUSTOM_BABEL_CONFIG_ENABLED = false;
1515
const DEFAULT_BABEL_CONFIG = {
1616
presets: ['es2015', 'react', 'stage-0'],
1717
plugins: [
18-
'transform-decorators-legacy',
19-
'transform-async-to-generator',
20-
'transform-object-rest-spread',
21-
'transform-class-properties',
18+
decoratorsPlugin,
19+
asyncPlugin,
20+
restSpreadPlugin,
21+
classPropertiesPlugin,
2222
],
2323
retainLines: true,
2424
};

src/sandbox/eval/js/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// @flow
2-
32
import { transform } from 'babel-standalone';
43

54
import type { Module, Directory } from 'common/types';
@@ -33,7 +32,7 @@ const compileCode = (
3332
return transform(code, babelConfig).code;
3433
} catch (e) {
3534
e.message = e.message.split('\n')[0].replace('unknown', moduleName);
36-
throw new Error(e);
35+
throw e;
3736
}
3837
};
3938

0 commit comments

Comments
 (0)