// HTML import $header from './header.html'; document.body.insertAdjacentHTML('beforeend', $header); // CSS import './styles.css'; // Images import image from './image.png'; const img = document.createElement('img'); img.src = image;
var path = require('path'); module.exports = { entry: path.join(__dirname, 'src/index.js'), output: { filename: 'bundle.js', path: 'build' } };
var path = require('path'); module.exports = { entry: path.join(__dirname, 'src/index.js'), output: { filename: 'bundle.js', path: 'build' }, module: { loaders: [ { test: /\.js$/, loader: 'babel' } ] } };
var path = require('path'); module.exports = { entry: path.join(__dirname, 'src/index.js'), output: { filename: 'bundle.js', path: 'build' }, module: { loaders: [ { test: /\.js$/, loader: 'babel' } ] }, plugins: [ new webpack.NoErrorsPlugin() ] };
https://github.com/jlowgren/webpack-lab
By Joacim Löwgren
Small introduction to Webpack before jumping over to a lab.