Files
ag-grid-react-example/config/webpack.config.examples.js
2017-11-08 14:45:28 +00:00

44 lines
1.2 KiB
JavaScript

const path = require('path');
const SRC_DIR = path.resolve(__dirname, '../src-examples');
module.exports = {
entry: SRC_DIR + "/index.js",
output: {
path: path.resolve(__dirname, '../'),
filename: "dist/react-examples.js"
},
module: {
loaders: [
{
test: /\.css$/,
loader: "style!css"
},
{
test: /\.js$|\.jsx$/,
include: SRC_DIR,
loader: 'babel-loader',
query: {
presets: ['react', 'es2015', 'stage-0']
}
},
{
test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)$/,
loader: 'file?name=[path]/[name].[ext]'
}
]
},
resolve: {
alias: {
"ag-grid": path.resolve('./node_modules/ag-grid'),
"ag-grid-enterprise": path.resolve('./node_modules/ag-grid-enterprise'),
react: path.resolve('./node_modules/react')
},
extensions: ['', '.js', '.jsx']
},
devServer: {
historyApiFallback: true,
contentBase: './',
hot: true
}
};