gajus / gajus/to-string-loader
How do I remove unnecessary JS code from css-loader
- Dominant language
- JavaScript
- Stars
- 65
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
This package works as expected, but I don't want my `` tag to include unnecessary code. How can I remove it?
Example:
<img src="https://user-images.githubusercontent.com/54054900/181667132-ce0befb0-9569-4a77-99e8-e324c29895fc.png" height="200"/>
This code:
```js
import html from "../public/index.html";
import css from "./styles/index.css";
console.log(html, css);
```
should be converted to:
```html
<script>
console.log(`div id="menu-container"> <header> header </header> <main> main </main> </div>`, `#menu-container{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}`);
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing how to-string-loader handles the HTML and CSS imports in the example and compare its generated output with the requested script. Check the webpack loader configuration involved in the example and determine whether removing the unnecessary code is supported. Done means the example produces only the requested console.log payload without the extra code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, webpack
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100