Skip to content

Commit

Permalink
fix(migrate): Fix webpack.optimize.LoaderOptionsPlugin should be `w…
Browse files Browse the repository at this point in the history
…ebpack.LoaderOptionsPlugin` (#172)

Closes #171
  • Loading branch information
okonet authored Jul 17, 2017
1 parent 887d6a6 commit a69c7a9
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/transformations/__snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = {
new webpack.optimize.UglifyJsPlugin({
sourceMap: true,
}),
new webpack.optimize.LoaderOptionsPlugin({
new webpack.LoaderOptionsPlugin({
debug: true,
minimize: true,
})
Expand Down Expand Up @@ -97,7 +97,7 @@ module.exports = {
new webpack.optimize.UglifyJsPlugin({
sourceMap: true
}),
new webpack.optimize.LoaderOptionsPlugin({
new webpack.LoaderOptionsPlugin({
debug: true,
minimize: true
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ exports[`loaderOptionsPlugin transforms correctly using "loaderOptionsPlugin-1"
debug: true,
plugins: [
new webpack.optimize.UglifyJsPlugin(),
new webpack.optimize.LoaderOptionsPlugin({
new webpack.LoaderOptionsPlugin({
foo: 'bar',
debug: true,
minimize: true
Expand All @@ -30,7 +30,7 @@ exports[`loaderOptionsPlugin transforms correctly using "loaderOptionsPlugin-2"
module.exports = {
plugins: [
new SomePlugin(),
new webpack.optimize.LoaderOptionsPlugin({
new webpack.LoaderOptionsPlugin({
foo: 'bar'
})
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
debug: true,
plugins: [
new webpack.optimize.UglifyJsPlugin(),
new webpack.optimize.LoaderOptionsPlugin({
new webpack.LoaderOptionsPlugin({
foo: 'bar'
})
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
module.exports = {
plugins: [
new SomePlugin(),
new webpack.optimize.LoaderOptionsPlugin({
new webpack.LoaderOptionsPlugin({
foo: 'bar'
})
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ module.exports = function(j, ast) {
.filter(path => safeTraverse(path, ['parent', 'value', 'key', 'name']) === 'plugins')
.forEach(path => {
!isEmpty(loaderOptions) &&
createOrUpdatePluginByName(j, path, 'webpack.optimize.LoaderOptionsPlugin', loaderOptions);
createOrUpdatePluginByName(j, path, 'webpack.LoaderOptionsPlugin', loaderOptions);
});
};

0 comments on commit a69c7a9

Please sign in to comment.