Skip to content

Commit

Permalink
fix: broken URL in generated webpack.config.js (#2600)
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 committed Apr 6, 2021
1 parent 0144aaa commit 6e207bc
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Generated using webpack-cli http://github.com/webpack-cli
// Generated using webpack-cli https://github.com/webpack/webpack-cli

const path = require('path');<% if (htmlWebpackPlugin) { %>
const HtmlWebpackPlugin = require('html-webpack-plugin');<% } %><% if (isExtractPlugin) { %>
const MiniCssExtractPlugin = require('mini-css-extract-plugin');<% } %>
Expand Down
36 changes: 24 additions & 12 deletions test/init/__snapshots__/init.test.js.snap.webpack4
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ Object {
`;

exports[`init command should configure WDS as opted 2`] = `
"// Generated using webpack-cli http://github.com/webpack-cli
"// Generated using webpack-cli https://github.com/webpack/webpack-cli

const path = require('path');

module.exports = {
Expand Down Expand Up @@ -96,7 +97,8 @@ Object {
`;

exports[`init command should configure assets modules by default 2`] = `
"// Generated using webpack-cli http://github.com/webpack-cli
"// Generated using webpack-cli https://github.com/webpack/webpack-cli

const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');

Expand Down Expand Up @@ -153,7 +155,8 @@ Object {
`;

exports[`init command should configure html-webpack-plugin as opted 2`] = `
"// Generated using webpack-cli http://github.com/webpack-cli
"// Generated using webpack-cli https://github.com/webpack/webpack-cli

const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');

Expand Down Expand Up @@ -208,7 +211,8 @@ Object {
`;

exports[`init command should generate ES6 project correctly 2`] = `
"// Generated using webpack-cli http://github.com/webpack-cli
"// Generated using webpack-cli https://github.com/webpack/webpack-cli

const path = require('path');

module.exports = {
Expand Down Expand Up @@ -324,7 +328,8 @@ Object {
`;

exports[`init command should generate typescript project correctly 2`] = `
"// Generated using webpack-cli http://github.com/webpack-cli
"// Generated using webpack-cli https://github.com/webpack/webpack-cli

const path = require('path');

module.exports = {
Expand Down Expand Up @@ -381,7 +386,8 @@ Object {
`;

exports[`init command should use less in project when selected 2`] = `
"// Generated using webpack-cli http://github.com/webpack-cli
"// Generated using webpack-cli https://github.com/webpack/webpack-cli

const path = require('path');

module.exports = {
Expand Down Expand Up @@ -435,7 +441,8 @@ Object {
`;

exports[`init command should use mini-css-extract-plugin when selected 2`] = `
"// Generated using webpack-cli http://github.com/webpack-cli
"// Generated using webpack-cli https://github.com/webpack/webpack-cli

const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');

Expand Down Expand Up @@ -471,7 +478,8 @@ module.exports = {
`;

exports[`init command should use postcss in project when selected 1`] = `
"// Generated using webpack-cli http://github.com/webpack-cli
"// Generated using webpack-cli https://github.com/webpack/webpack-cli

const path = require('path');

module.exports = {
Expand Down Expand Up @@ -529,7 +537,8 @@ Object {
`;

exports[`init command should use sass and css with postcss in project when selected 2`] = `
"// Generated using webpack-cli http://github.com/webpack-cli
"// Generated using webpack-cli https://github.com/webpack/webpack-cli

const path = require('path');

module.exports = {
Expand Down Expand Up @@ -586,7 +595,8 @@ Object {
`;

exports[`init command should use sass in project when selected 2`] = `
"// Generated using webpack-cli http://github.com/webpack-cli
"// Generated using webpack-cli https://github.com/webpack/webpack-cli

const path = require('path');

module.exports = {
Expand Down Expand Up @@ -642,7 +652,8 @@ Object {
`;

exports[`init command should use sass with postcss in project when selected 2`] = `
"// Generated using webpack-cli http://github.com/webpack-cli
"// Generated using webpack-cli https://github.com/webpack/webpack-cli

const path = require('path');

module.exports = {
Expand Down Expand Up @@ -695,7 +706,8 @@ Object {
`;

exports[`init command should use stylus in project when selected 2`] = `
"// Generated using webpack-cli http://github.com/webpack-cli
"// Generated using webpack-cli https://github.com/webpack/webpack-cli

const path = require('path');

module.exports = {
Expand Down
36 changes: 24 additions & 12 deletions test/init/__snapshots__/init.test.js.snap.webpack5
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ Object {
`;

exports[`init command should configure WDS as opted 2`] = `
"// Generated using webpack-cli http://github.com/webpack-cli
"// Generated using webpack-cli https://github.com/webpack/webpack-cli

const path = require('path');

module.exports = {
Expand Down Expand Up @@ -96,7 +97,8 @@ Object {
`;

exports[`init command should configure assets modules by default 2`] = `
"// Generated using webpack-cli http://github.com/webpack-cli
"// Generated using webpack-cli https://github.com/webpack/webpack-cli

const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');

Expand Down Expand Up @@ -153,7 +155,8 @@ Object {
`;

exports[`init command should configure html-webpack-plugin as opted 2`] = `
"// Generated using webpack-cli http://github.com/webpack-cli
"// Generated using webpack-cli https://github.com/webpack/webpack-cli

const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');

Expand Down Expand Up @@ -208,7 +211,8 @@ Object {
`;

exports[`init command should generate ES6 project correctly 2`] = `
"// Generated using webpack-cli http://github.com/webpack-cli
"// Generated using webpack-cli https://github.com/webpack/webpack-cli

const path = require('path');

module.exports = {
Expand Down Expand Up @@ -324,7 +328,8 @@ Object {
`;

exports[`init command should generate typescript project correctly 2`] = `
"// Generated using webpack-cli http://github.com/webpack-cli
"// Generated using webpack-cli https://github.com/webpack/webpack-cli

const path = require('path');

module.exports = {
Expand Down Expand Up @@ -381,7 +386,8 @@ Object {
`;

exports[`init command should use less in project when selected 2`] = `
"// Generated using webpack-cli http://github.com/webpack-cli
"// Generated using webpack-cli https://github.com/webpack/webpack-cli

const path = require('path');

module.exports = {
Expand Down Expand Up @@ -435,7 +441,8 @@ Object {
`;

exports[`init command should use mini-css-extract-plugin when selected 2`] = `
"// Generated using webpack-cli http://github.com/webpack-cli
"// Generated using webpack-cli https://github.com/webpack/webpack-cli

const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');

Expand Down Expand Up @@ -471,7 +478,8 @@ module.exports = {
`;

exports[`init command should use postcss in project when selected 1`] = `
"// Generated using webpack-cli http://github.com/webpack-cli
"// Generated using webpack-cli https://github.com/webpack/webpack-cli

const path = require('path');

module.exports = {
Expand Down Expand Up @@ -529,7 +537,8 @@ Object {
`;

exports[`init command should use sass and css with postcss in project when selected 2`] = `
"// Generated using webpack-cli http://github.com/webpack-cli
"// Generated using webpack-cli https://github.com/webpack/webpack-cli

const path = require('path');

module.exports = {
Expand Down Expand Up @@ -586,7 +595,8 @@ Object {
`;

exports[`init command should use sass in project when selected 2`] = `
"// Generated using webpack-cli http://github.com/webpack-cli
"// Generated using webpack-cli https://github.com/webpack/webpack-cli

const path = require('path');

module.exports = {
Expand Down Expand Up @@ -642,7 +652,8 @@ Object {
`;

exports[`init command should use sass with postcss in project when selected 2`] = `
"// Generated using webpack-cli http://github.com/webpack-cli
"// Generated using webpack-cli https://github.com/webpack/webpack-cli

const path = require('path');

module.exports = {
Expand Down Expand Up @@ -695,7 +706,8 @@ Object {
`;

exports[`init command should use stylus in project when selected 2`] = `
"// Generated using webpack-cli http://github.com/webpack-cli
"// Generated using webpack-cli https://github.com/webpack/webpack-cli

const path = require('path');

module.exports = {
Expand Down

0 comments on commit 6e207bc

Please sign in to comment.