var webpack = require('webpack');
var path = require('path');
const flaskApp = path.join(__dirname, '../', 'app_name');
module.exports = {
entry: __dirname + '/src/index.jsx',
output: {
path: flaskApp + '/static',
filename: 'bundle.js',
},
resolve: {
extensions: ['.js', '.jsx', '.css', '.json']
},
module: {
rules: [{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
loader: 'babel-loader'
}, {
test: /\.less$/,
loaders: ["style-loader", "css-loader", "less-loader"]
}, {
test: /\.css$/,
loaders: ['style-loader', 'css-loader']
}, {
test: /\.(png|woff|woff2|eot|ttf|svg)$/,
loader: 'url-loader?limit=100000'
}, {
test: /\.geojson$/,
loader: 'url-loader?limit=100000'
}, {
type: 'javascript/auto',
test: /\.json$/,
use: [{
loader: 'file-loader',
options: {
name: "[path][name].[ext]"
}
}
]
}
]
},
};