Initial commit
This commit is contained in:
commit
cf9b0cfdaf
18 changed files with 2291 additions and 0 deletions
31
webpack.config.js
Normal file
31
webpack.config.js
Normal file
|
@ -0,0 +1,31 @@
|
|||
const 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', 'react', 'stage-2']
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
resolve: {
|
||||
modules: [path.resolve(__dirname, 'src/'), 'node_modules', __dirname],
|
||||
extensions: ['.js', '.jsx', '.scss'],
|
||||
},
|
||||
externals: {
|
||||
'react': 'commonjs react'
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue