Skip to content

inspirnathan/magic-string-library-tutorial

Repository files navigation

How to Use the Magic String Library

Learn how to easily generate source maps for modified code!

This code supplements the tutorial at https://inspirnathan.com/posts/27-how-to-use-the-magic-string-library/

Install Magic String Library

To get started: npm install or npm i

First Example

To run the first example in the tutorial: node example

This will create two files: converted.js and converted.js.map.

Second Example

To run the second example in the tutorial: node emotion-transformer

This will create two files: output.js and output.js.map.

Running the Server

You can run a small web server using npm start to serve the index.html file included in this repo. It is currently set up to fetch output.js files from example #2. Run the node script mentioned in the above sections to generate this file.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published