server/apps/comments/webpack.js
Roeland Jago Douma 41ef3d860c
Move comments to webpack
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-02-26 09:10:23 +01:00

40 lines
687 B
JavaScript

const path = require('path');
module.exports = {
entry: path.join(__dirname, 'src', 'comments.js'),
output: {
path: path.resolve(__dirname, './js'),
publicPath: '/js/',
filename: 'comments.js'
},
module: {
rules: [
{
test: /\.css$/,
use: ['style-loader', 'css-loader']
},
{
test: /\.scss$/,
use: ['style-loader', 'css-loader', 'sass-loader']
},
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/
},
{
test: /\.(png|jpg|gif|svg)$/,
loader: 'file-loader',
options: {
name: '[name].[ext]?[hash]'
}
}
]
},
externals: {
jquery: 'jQuery'
},
resolve: {
extensions: ['*', '.js']
}
};