Comments (8)
Oh. I am too drunk right now
from pwa.
Awesome. I like new integration
from pwa.
Thanks
-
I didn't know
optimize-css-assets
plugin accepted a browsers list. That's good to know and should add it right away -
I definitely want to read from existing
browserslist
config locations, which replace the contents ofconfig.browsers
array. However, I would aim to maintain theconfig.browsers
option until it's completely clearly not an option anymore. At this point, the1.0
can introduce that breaking change outright.
If it weren't for the fact that config.browsers
takes a function, which can dynamically change its value in response to X
, I'd be all in favor of just using the existing locations. However, it's been very convenient for me at work to do something like this:
config.browsers = function (config) {
return process.env.ELECTRON !== void 0 ? ['electron > 2'] : config;
}
This can't be (easily) done with its static-config-file setup.
from pwa.
So I just discovered this which I think will do just fine for work projects.
This means I can get rid of the config.browsers
key, scaffold the package.json
config by default (for projects with pwa init
, and still expose the opts.browsers
to any other plugin or preset (or user config).
Working on this now~
from pwa.
Yeap, if you will translate option to env variable, it will work pretty well.
The only problem, it will not with text editors and others cases out of build pipeline. But I think it is OK as short term solution.
from pwa.
Can you explain your last sentence? Not quite sure I understand, sorry
from pwa.
@lukeed Browserslist could be used not only by build tools (like cssnano in webpack). But also by plugins for text editors (there is ESLint plugin, which uses Browserslist, ESLint could be run from the text editor). If we will set browsers by BROWSERSLIST
env variable it will not affect cases like text editors plugins.
But i it is a rare case. It is OK to use BROWSERSLIST
at least as a temporary solution until the major release.
from pwa.
Ah, got it
Not sure if you've checked out the PR (I don't expect you to), but all the Browserslist integrations are a lot simpler now & will be easier to manage going forward.
Also, thank you so much for all your contributions to the tooling community
from pwa.
Related Issues (20)
- Irrelevant question HOT 1
- Export to relative paths? HOT 6
- Creating a project with just 'less' preprocessor throws an error HOT 1
- PWA command not found on local install HOT 2
- Add push notifications and things mentioned in here
- How do I deloy on a heroku server? HOT 2
- how could I contribute translation for this project? HOT 2
- Service Worker
- Feature Request - Init into existing Project HOT 1
- React Installed brand new, not working straight up. HOT 5
- Config for supplying own service worker file
- npm i missing from docs
- Help, how to remove .svelte file from browser source HOT 3
- Duplicated App in svelte production HOT 2
- Create sub-folder in pages folder [Svelte] HOT 2
- @pwa/plugin-typescript is not published HOT 2
- Custom postcss webpack style rules missing with pwa.config.js HOT 8
- Handle LauncherError exception HOT 4
- When you say "WIP" what does that mean? HOT 2
- pnpm install
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pwa.