mirror of https://gitee.com/godoos/godoos.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1022 B
56 lines
1022 B
var webpack = require('webpack');
|
|
var path = require('path');
|
|
|
|
module.exports = {
|
|
entry: [
|
|
'./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: ['babel-loader']
|
|
},
|
|
]
|
|
},
|
|
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: "./",
|
|
static: {
|
|
directory: path.resolve(__dirname, "./"),
|
|
},
|
|
}
|
|
};
|