Skip to content

Instantly share code, notes, and snippets.

@killmenot
Last active October 6, 2020 10:53
Show Gist options
  • Save killmenot/ca5f2efd020e7c5870fc671910e520b0 to your computer and use it in GitHub Desktop.
Save killmenot/ca5f2efd020e7c5870fc671910e520b0 to your computer and use it in GitHub Desktop.
'use strict';
const path = require('path');
module.exports = {
context: path.resolve(__dirname, 'src'),
entry: {
bundle: './app.js',
},
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'dist'),
publicPath: '/'
},
externals: {
jquery: 'jQuery',
},
resolve: {
alias: {
'jquery.appear': path.resolve(__dirname, 'node_modules/jquery.appear/jquery.appear.js'),
'jquery-countto': path.resolve(__dirname, 'node_modules/jquery-countto/jquery.countTo.js')
}
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: [
{
loader: 'babel-loader',
options: {
babelrc: true
}
}
]
}
]
},
plugins: [],
mode: 'development',
devtool: 'cheap-inline-module-source-map',
devServer: {
contentBase: false,
host: '0.0.0.0',
port: 9000 }
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment