mirror of
https://github.com/danog/react-datalist-input.git
synced 2024-12-03 18:07:55 +01:00
40 lines
1.0 KiB
JavaScript
40 lines
1.0 KiB
JavaScript
|
var path = require('path');
|
||
|
module.exports = {
|
||
|
entry: './src/index.js',
|
||
|
output: {
|
||
|
path: path.resolve(__dirname, 'build'),
|
||
|
filename: 'index.js',
|
||
|
libraryTarget: 'commonjs2'
|
||
|
},
|
||
|
module: {
|
||
|
rules: [
|
||
|
{
|
||
|
test: /\.js$/,
|
||
|
include: path.resolve(__dirname, 'src'),
|
||
|
exclude: /(node_modules|bower_components|build)/,
|
||
|
use: {
|
||
|
loader: 'babel-loader',
|
||
|
options: {
|
||
|
presets: ['env']
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
test: /^(?!.*?\.module).*\.css$/,
|
||
|
use: ['style-loader', 'css-loader']
|
||
|
},
|
||
|
{
|
||
|
test: /\.module\.css$/,
|
||
|
use: ['style-loader', {
|
||
|
loader: 'css-loader',
|
||
|
options: {
|
||
|
modules: true
|
||
|
}
|
||
|
}]
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
externals: {
|
||
|
'react': 'commonjs react'
|
||
|
}
|
||
|
};
|