Skip to content

Commit f0fd8bf

Browse files
fix(template): set the conditional import depending on langtype
1 parent 006c1f8 commit f0fd8bf

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

packages/create-webpack-app/templates/init/react/webpack.config.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Generated using webpack-cli https://github.com/webpack/webpack-cli
22

33
import path from "node:path";
4-
import { fileURLToPath } from "node:url";<% if (htmlWebpackPlugin) { %>
4+
import { fileURLToPath } from "node:url";<% if (langType === "Typescript") { %>
55
import { type Configuration } from "webpack";<% if (devServer) { %>
66
import "webpack-dev-server";<% } %><% } %><% if (htmlWebpackPlugin) { %>
77
import HtmlWebpackPlugin from "html-webpack-plugin";<% } %><% if (extractPlugin !== "No") { %>

packages/create-webpack-app/templates/init/svelte/webpack.config.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Generated using webpack-cli https://github.com/webpack/webpack-cli
22

33
import path from "node:path";
4-
import { fileURLToPath } from "node:url";<% if (htmlWebpackPlugin) { %>
4+
import { fileURLToPath } from "node:url";<% if (langType === "Typescript") { %>
55
import { type Configuration } from "webpack";<% if (devServer) { %>
66
import "webpack-dev-server";<% } %><% } %><% if (htmlWebpackPlugin) { %>
77
import HtmlWebpackPlugin from "html-webpack-plugin";<% } %><% if (extractPlugin !== "No") { %>

packages/create-webpack-app/templates/init/vue/webpack.config.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { VueLoaderPlugin } from "vue-loader";
44
import path from "node:path";
5-
import { fileURLToPath } from "node:url";<% if (htmlWebpackPlugin) { %>
5+
import { fileURLToPath } from "node:url";<% if (langType === "Typescript") { %>
66
import { type Configuration } from "webpack";<% if (devServer) { %>
77
import "webpack-dev-server";<% } %><% } %><% if (htmlWebpackPlugin) { %>
88
import HtmlWebpackPlugin from "html-webpack-plugin";<% } %><% if (extractPlugin !== "No") { %>

0 commit comments

Comments
 (0)