3

Filthy Pollo: import {globalStore} from '../main.js'

Filthy Pollo: is that unstandard javascript?

Filthy Pollo: it makes me think it's from webpack

Filthy Pollo: unforgiving...

Ron Chi: i wont answer these questions again

Ron Chi: i already told u chrome supports imports its been a few months

Ron Chi: modules are evaled once, so if u have some state living in ur module if u reimport it ull just get that same state
Ron Chi: myModule.js - const myShit = { 'a': 'eh?' }; export { myShit };

Filthy Pollo: https://i.imgur.com/1X4Taik.png

Filthy Pollo: gg

Ron Chi: index.js - import { myShit } from './myModule.js'

Filthy Pollo: import and export are unexcepted token

Ron Chi: import needs to be used at the top of a file, before any other code

Filthy Pollo: https://i.imgur.com/myrrIMx.png

Filthy Pollo: Im going to assume import and export aren't supported in the browser

Ron Chi: because ur squigly line in ur editor?

Filthy Pollo: This feature is only implemented natively in Safari and Chrome at this time. It is implemented in many transpilers, such as the Traceur Compiler, Babel or Rollup.

Ron Chi: https://github.com/paulirish/...

Ron Chi: actually i dont think its handled properly by babel, webpack handles it

Filthy Pollo: what the fuck why use import and export that wont work in other browsers like firefox, edge, etc. ?

Ron Chi: because other browsers are slow

Ron Chi: its still standard

Filthy Pollo: your answer is not really professional

Ron Chi: ?

Ron Chi: why because its my fault that other browsers are still working on it

Ron Chi: they fought over implementation details forever, than it has to be implemented properly before shipping it

Filthy Pollo: Im blaming the people who are still using export and import in the browsers

Ron Chi: u wont be using modules without transpiling without some limited market for a couple years, otherwise ull still be using rollup / system.js / webpack

Filthy Pollo: obviously webpack

Ron Chi: thats up to you, it seems the google ppl use rollup

Ron Chi: but most of the community chose webpack

Ron Chi: angular 2 uses system.js internally i think

Filthy Pollo: Firefox 54 – behind the dom.moduleScripts.enabled setting in about:config.
Edge 15 – behind the Experimental JavaScript Features setting in about:flags.

Filthy Pollo: nobody wants to be bothered to change settings in flags

Filthy Pollo: the developers who use experimental features are weirdos as hell

Filthy Pollo: the joke is when they use experimental feature for production and force them to download chrome

Filthy Pollo: Monopoly as hell

Filthy Pollo: Corruption of User Experience

Comments
Add Comment