From 9815d3b7c615ff0db6b49295e0b4a409610c8e0a Mon Sep 17 00:00:00 2001 From: Dan Mooney Date: Wed, 20 May 2026 11:11:37 -0500 Subject: [PATCH] Separate HTML template from build output webpack was using public/index.html as both the HtmlWebpackPlugin template and its output, causing each build to re-inject a bundle.js script tag into the source. Move the template to src/index.html and let webpack regenerate public/index.html on build. Co-Authored-By: Claude Opus 4.7 (1M context) --- .gitignore | 1 - public/index.html | 116 ---------------------------------------------- src/index.html | 97 ++++++++++++++++++++++++++++++++++++++ webpack.config.js | 2 +- 4 files changed, 98 insertions(+), 118 deletions(-) delete mode 100644 public/index.html create mode 100644 src/index.html diff --git a/.gitignore b/.gitignore index d6733d7..a77d830 100644 --- a/.gitignore +++ b/.gitignore @@ -37,7 +37,6 @@ starting_files/ test-results/ public/* !public/.gitkeep -!public/index.html !public/privacy.html !public/favicon.svg !ads.txt diff --git a/public/index.html b/public/index.html deleted file mode 100644 index 8d82fdf..0000000 --- a/public/index.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - Python Dict to JSON Converter Online - - - - -
- -
- - -

About Python Dictionaries and JSON

- -
-

What is a Python Dictionary?

-

A Python dictionary is a built-in data structure that stores key-value pairs. It's one of Python's most useful and widely-used data types, allowing you to create mappings between related pieces of information. Dictionaries are defined using curly braces {} with key-value pairs separated by commas.

- -

Key Features of Python Dictionaries:

-
    -
  • Keys must be unique and immutable (strings, numbers, or tuples)
  • -
  • Values can be of any type, including other dictionaries
  • -
  • Dictionaries are mutable and can be modified after creation
  • -
  • Order is preserved in Python 3.7+ (unordered in earlier versions)
  • -
- -

Learn more about Python dictionaries in the official Python documentation.

-
- -
-

What is JSON?

-

JSON (JavaScript Object Notation) is a lightweight, text-based data interchange format that's easy for humans to read and write and easy for machines to parse and generate. It's language-independent and has become one of the most popular data formats for web APIs and configuration files.

- -

Key Features of JSON:

-
    -
  • Data types: strings, numbers, booleans, null, arrays, and objects
  • -
  • Uses double quotes for strings and property names
  • -
  • No support for comments or trailing commas
  • -
  • Widely supported across programming languages
  • -
- -

Learn more about JSON at json.org.

-
- -
-

Converting Between Python Dictionaries and JSON

-

While Python dictionaries and JSON objects are similar, there are some key differences in syntax and data types:

- - - - - - - - - - - - - - - - - - - - - - -
PythonJSON
True/Falsetrue/false
Nonenull
Single or double quotesDouble quotes only
- -

Our converter handles these differences automatically, ensuring your Python dictionary is properly converted to valid JSON format.

-
- -
-

Common Use Cases

-
    -
  • Converting configuration files between Python and JSON formats
  • -
  • Preparing data for REST APIs that require JSON
  • -
  • Debugging Python dictionary structures
  • -
  • Learning the differences between Python and JSON syntax
  • -
-
-
- -
-

For more information about data structures and formats, visit:

- -

As an Amazon Associate, we earn from qualifying purchases. This site may contain affiliate links; we may earn a commission at no extra cost to you.

-

Privacy Policy

-
- - - - - diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000..2b5f566 --- /dev/null +++ b/src/index.html @@ -0,0 +1,97 @@ + + + + + + Python Dict to JSON Converter Online + + + + +
+ +
+ + +

About Python Dictionaries and JSON

+ +
+

What is a Python Dictionary?

+

A Python dictionary is a built-in data structure that stores key-value pairs. It's one of Python's most useful and widely-used data types, allowing you to create mappings between related pieces of information. Dictionaries are defined using curly braces {} with key-value pairs separated by commas.

+

Key Features of Python Dictionaries:

+
    +
  • Keys must be unique and immutable (strings, numbers, or tuples)
  • +
  • Values can be of any type, including other dictionaries
  • +
  • Dictionaries are mutable and can be modified after creation
  • +
  • Order is preserved in Python 3.7+ (unordered in earlier versions)
  • +
+

Learn more about Python dictionaries in the official Python documentation.

+
+ +
+

What is JSON?

+

JSON (JavaScript Object Notation) is a lightweight, text-based data interchange format that's easy for humans to read and write and easy for machines to parse and generate. It's language-independent and has become one of the most popular data formats for web APIs and configuration files.

+

Key Features of JSON:

+
    +
  • Data types: strings, numbers, booleans, null, arrays, and objects
  • +
  • Uses double quotes for strings and property names
  • +
  • No support for comments or trailing commas
  • +
  • Widely supported across programming languages
  • +
+

Learn more about JSON at json.org.

+
+ +
+

Converting Between Python Dictionaries and JSON

+

While Python dictionaries and JSON objects are similar, there are some key differences in syntax and data types:

+ + + + + + + + + +
PythonJSON
True/Falsetrue/false
Nonenull
Single or double quotesDouble quotes only
+

Our converter handles these differences automatically, ensuring your Python dictionary is properly converted to valid JSON format.

+
+ +
+

Common Use Cases

+
    +
  • Converting configuration files between Python and JSON formats
  • +
  • Preparing data for REST APIs that require JSON
  • +
  • Debugging Python dictionary structures
  • +
  • Learning the differences between Python and JSON syntax
  • +
+
+
+ +
+

For more information about data structures and formats, visit:

+ +

As an Amazon Associate, we earn from qualifying purchases. This site may contain affiliate links; we may earn a commission at no extra cost to you.

+

Privacy Policy

+
+ + + + + diff --git a/webpack.config.js b/webpack.config.js index b9282fa..b05b0f1 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -27,7 +27,7 @@ module.exports = { }, plugins: [ new HtmlWebpackPlugin({ - template: './public/index.html', + template: './src/index.html', }), ], devServer: {