70 %
Chris Biscardi

Snowpack

ESModules

JS
// ✔ RUNS IN THE BROWSER
import React from '/web_modules/react.js';
// ✘ WON'T RUN IN THE BROWSER
// ✔ CAN BE TRANSFORMED AUTOMATICALLY BY BABEL, ETC.
import React from 'react';

weird stuff: you end up having to import files exactly. You can't import a folder name and get index.js inside of it, you have to use `folder/index.js`.

  • No componentPath to import for .js files that are the index.js file