Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Mocha ES6 modules: webpack config final
module.exports = {
entry: ['./setup.js', './run.js'],
output: {
filename: 'bundle.js',
resolve: {
alias: {
// map remote chai.js url to locally installed in node_modules
'': 'chai/chai.js'
module: {
rules: [
// load chai.js like a normal <script> tag
test: require.resolve('chai/chai.js'),
use: 'script-loader'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.