Closed sunmingtao closed 3 years ago
src/index.js
import helloWorld from './hello-world.js'; helloWorld();
src/helloworld.js
function helloWorld() { console.log('Hello world'); } export default helloWorld;
Run npx webpack main.js under dist is empty
npx webpack
main.js
Rookie mistake. Turns out I forgot to save index.js and helloworld.js. I am not in a habit of pressing Ctrl+s because I primarily use Intellij.
src/index.js
src/helloworld.js
Run
npx webpack
main.js
under dist is empty