es6 modules Flashcards
1
Q
How are ES Modules different from CommonJS modules?
A
the syntax is the main difference, and the way we import and export them(import vs require etc etc)
also the internal workings are different
import: import { export1 } from “module-name”;
require: const config = require(‘/path/to/file’);
2
Q
What kind of modules can Webpack support?
A
the es6-modules and the common js modules