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

40 lines
772 B
JavaScript

'use strict'
const webpack = require('webpack')
const path = require('path')
module.exports = {
entry: {
main: './src/js/main'
},
output: {
path: path.join(__dirname, 'dist', 'js'),
filename: '[name].js'
},
module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: [ '@babel/preset-env' ]
}
}
},
{
test: /src\/style\/.+\.styl$/,
loader: 'file-loader?name=./dist/style/[name].css!css-loader!stylus-loader'
}
]
},
plugins: [
new webpack.ProvidePlugin({
// Detect and inject
_: 'underscore'
})
],
devtool: 'inline-source-map'
}