From c6e0167372a286d33540de120b653bf797363fde Mon Sep 17 00:00:00 2001 From: "Michael \"Z\" Goddard" Date: Mon, 30 Apr 2018 18:24:56 -0400 Subject: [PATCH 1/2] chore(webpack): configure babel loader to build scratch deps Configure loaders so they operate on individual modules in scratch-* dependencies. --- webpack.config.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 68c87a3ae6b..fad2ba4bc4d 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -32,7 +32,20 @@ const base = { rules: [{ test: /\.jsx?$/, loader: 'babel-loader', - include: path.resolve(__dirname, 'src') + include: [path.resolve(__dirname, 'src'), /node_modules[\\/]scratch-[^\\/]+[\\/]src/], + options: { + // Explicitly disable babelrc so we don't catch various config + // in much lower dependencies. + babelrc: false, + plugins: [ + 'syntax-dynamic-import', + 'transform-async-to-generator', + 'transform-object-rest-spread', + ['react-intl', { + messagesDir: './translations/messages/' + }]], + presets: [['env', {targets: {browsers: ['last 3 versions', 'Safari >= 8', 'iOS >= 8']}}], 'react'] + } }, { test: /\.css$/, From 34709690458a65be000cb130b2670ec0e2272a61 Mon Sep 17 00:00:00 2001 From: Ray Schamp Date: Thu, 10 May 2018 17:03:44 -0400 Subject: [PATCH 2/2] Don't resolve symlinks, so npm linked environments work --- webpack.config.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/webpack.config.js b/webpack.config.js index fad2ba4bc4d..a44d90c48e2 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -28,6 +28,9 @@ const base = { React: 'react', ReactDOM: 'react-dom' }, + resolve: { + symlinks: false + }, module: { rules: [{ test: /\.jsx?$/,