This repository has been archived on 2022-11-26. You can view files and clone it, but cannot push or open issues or pull requests.
teemant-old/webpack.config.js

45 lines
837 B
JavaScript
Raw Normal View History

2019-01-09 17:26:09 +00:00
'use strict'
2016-12-15 21:30:55 +00:00
2019-01-09 17:26:09 +00:00
const webpack = require('webpack')
const path = require('path')
const CopyWebpackPlugin = require('copy-webpack-plugin')
2016-12-15 21:30:55 +00:00
module.exports = {
2019-01-09 17:26:09 +00:00
entry: {
main: './src/js/main'
},
output: {
path: path.join(__dirname, 'app', 'public'),
2019-01-09 17:26:09 +00:00
filename: '[name].js'
},
module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: [ '@babel/preset-env' ]
}
}
}
]
},
plugins: [
new webpack.ProvidePlugin({
// Detect and inject
_: 'underscore'
}),
new CopyWebpackPlugin([{
from: 'src/document/index.html',
to: '.'
},
{
from: 'static',
to: 'static'
}])
2019-01-09 17:26:09 +00:00
],
devtool: 'inline-source-map'
}