Skip to content

Commit

Permalink
Merge pull request #137 from alexandernanberg/patch-1
Browse files Browse the repository at this point in the history
Resolve plugins and loaders
  • Loading branch information
swyxio authored Apr 15, 2019
2 parents 83dbeba + bf9d034 commit 9c78a3f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ function webpackConfig(dir, additionalConfig) {
var babelOpts = { cacheDirectory: true };
if (!haveBabelrc(dir)) {
babelOpts.presets = [
['@babel/preset-env', { targets: { node: getBabelTarget(envConfig) } }]
[require.resolve('@babel/preset-env'), { targets: { node: getBabelTarget(envConfig) } }]
];

babelOpts.plugins = [
'@babel/plugin-proposal-class-properties',
'@babel/plugin-transform-object-assign',
'@babel/plugin-proposal-object-rest-spread'
require.resolve('@babel/plugin-proposal-class-properties'),
require.resolve('@babel/plugin-transform-object-assign'),
require.resolve('@babel/plugin-proposal-object-rest-spread')
];
}

Expand Down Expand Up @@ -87,7 +87,7 @@ function webpackConfig(dir, additionalConfig) {
`(node_modules|bower_components|${testFilePattern})`
),
use: {
loader: 'babel-loader',
loader: require.resolve('babel-loader'),
options: babelOpts
}
}
Expand Down

0 comments on commit 9c78a3f

Please sign in to comment.