Skip to content
Snippets Groups Projects
Commit c6e01673 authored by Michael "Z" Goddard's avatar Michael "Z" Goddard Committed by Ray Schamp
Browse files

chore(webpack): configure babel loader to build scratch deps

Configure loaders so they operate on individual modules in scratch-*
dependencies.
parent a9bc7d59
No related branches found
No related tags found
No related merge requests found
...@@ -32,7 +32,20 @@ const base = { ...@@ -32,7 +32,20 @@ const base = {
rules: [{ rules: [{
test: /\.jsx?$/, test: /\.jsx?$/,
loader: 'babel-loader', 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$/, test: /\.css$/,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment