Created
April 28, 2018 02:48
-
-
Save firedfox/7addc9eef9f45ea450dcc5c2142e5607 to your computer and use it in GitHub Desktop.
webpack config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @file webpack配置文件 | |
* @author wangyang02 | |
*/ | |
const webpack = require('webpack'); | |
module.exports = { | |
entry: __dirname + '/src/index.js', | |
output: { | |
libraryTarget: 'commonjs2' | |
}, | |
module: { | |
rules: [ | |
{ | |
test: /\.js$/, | |
exclude: /node_modules/, | |
use: { | |
loader: 'babel-loader' | |
} | |
} | |
] | |
}, | |
plugins: [ | |
new webpack.DefinePlugin({ | |
VERSION: JSON.stringify(require('./package.json').version) | |
}) | |
] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment