Was able to make it work by using the #stringify package to turn the CSS into a string in the build process, all good now.

#Browserify #Babel #JS #Javascript #WebDev #NodeJS #CSS

I’m having brain fog and not sure how to do this: is there a way to simply import a CSS file’s contents as a string in a JS module that I can use in an injected <style> tag, and have it work with #Browserify and #Babel and such?

This is making node/some part of the process unhappy:

```js
const foo = import(“../assets/bar.css”);

blah.textContent = foo;
```

#JS #Javascript #WebDev #NodeJS #CSS

Good reminder of why programmers must have the proper time to seek solutions:

When using #JS in a browser, not exclusively but specially when developing a browser extension, there are two ways of using a npm-installed package:

The right and more complex (slightly in this case) way is to use #Browserify or another similar tool.

The wrong way is to screw the entire Content #Security Policy (#CSP) and make the application potentially vulnerable.

Give your teams time. The right solution matters.

Turns out, the Unwebpack script in my JS Analysis repo was only accepting #Browserify and no #Webpack bundles. No idea how I got these mixed up, but now both are supported, to some degree. Webpack output can vary a lot, I have only some scenarios covered.

https://github.com/palant/js-analysis/

palant/js-analysis

Tools to make JavaScript code more readable. Contribute to palant/js-analysis development by creating an account on GitHub.

Web packaging technology is torture.

The last week, I've been fighting webpack, parcel, #rollup, babel and bili, just because vue stopped supporting #browserify and I had to figure what to use as a replacement in #beast.
^^^ If that sentence sounds like it has too many web tech buzzwords, that's *exactly* the problem.

And it's only a fraction of packages I had to deal with...
Most packages have documentation, but only provide tiny puzzles of a much bigger picture that is revealed nowhere...

Comment nous avons migré de browserify à webpack dans le but de découper notre code JavaScript : http://techblog.mappy.com/webperfs-webpack.html #webpack #browserify #webperfs #javascript #mappy
Découpage du code JavaScript grâce à webpack

Just in case there is anyone here with emscripten and browserify problem, let me publish here a question/problem/bug:
https://stackoverflow.com/questions/47511315/emscripten-module-in-browserify-pipeline

#emscripten #browserify #amd #javascript

Emscripten module in browserify pipeline

I'm trying to add an emscripten compiled module in our web site. To achieve this, I'm using browserify (with babelify transformation). The problem rises when the bundle is created: the emscripten...

#GitHub - browserify/browserify-handbook: how to build modular applications with #browserify https://github.com/browserify/browserify-handbook #libremonday
browserify/browserify-handbook

browserify-handbook - how to build modular applications with browserify