mirror of
https://github.com/viliusle/miniPaint.git
synced 2026-02-06 17:26:44 +00:00
60 lines
1.0 KiB
JavaScript
60 lines
1.0 KiB
JavaScript
var webpack = require('webpack');
|
|
var path = require('path');
|
|
|
|
module.exports = {
|
|
entry: [
|
|
'babel-polyfill',
|
|
'./src/js/main.js',
|
|
],
|
|
output: {
|
|
path: path.resolve(__dirname, 'dist'),
|
|
filename: 'bundle.js',
|
|
publicPath: '/dist/'
|
|
},
|
|
resolve: {
|
|
extensions: ['.js', '.css'],
|
|
alias: {
|
|
Utilities: path.resolve(__dirname, './../node_modules/')
|
|
}
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.css$/,
|
|
use: [
|
|
'style-loader',
|
|
{
|
|
loader: 'css-loader',
|
|
options: {url: false}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
test: /\.js$/,
|
|
exclude: /(node_modules|bower_components)/,
|
|
use: {
|
|
loader: 'babel-loader',
|
|
options: {
|
|
presets: ['env']
|
|
}
|
|
}
|
|
},
|
|
]
|
|
},
|
|
plugins: [
|
|
new webpack.ProvidePlugin({
|
|
$: "jquery",
|
|
jQuery: "jquery",
|
|
"window.jQuery": "jquery"
|
|
}),
|
|
new webpack.DefinePlugin({
|
|
VERSION: JSON.stringify(require("./package.json").version)
|
|
}),
|
|
],
|
|
devtool: "cheap-module-source-map",
|
|
devServer: {
|
|
//host: '0.0.0.0',
|
|
contentBase: "./",
|
|
compress: true,
|
|
}
|
|
}; |