2020-05-13 19:14:28 +08:00
|
|
|
const path = require('path');
|
|
|
|
|
2020-05-17 16:26:33 +08:00
|
|
|
const jsxInjectionPATH = 'PACKAGE/lib/jsxInjection';
|
|
|
|
|
2020-05-13 19:14:28 +08:00
|
|
|
module.exports = {
|
|
|
|
mode: 'development',
|
|
|
|
devtool: 'cheap-module-eval-source-map',
|
|
|
|
entry: './example/index.js',
|
|
|
|
output: {
|
|
|
|
path: path.resolve(__dirname, './dist'),
|
|
|
|
publicPath: '/dist/',
|
|
|
|
},
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.jsx?$/,
|
|
|
|
loader: 'babel-loader',
|
|
|
|
exclude: /node_modules/,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2020-05-17 16:26:33 +08:00
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
[jsxInjectionPATH]: path.resolve(
|
|
|
|
__dirname,
|
|
|
|
'./lib/jsxInjection',
|
|
|
|
),
|
|
|
|
},
|
|
|
|
},
|
2020-05-13 19:14:28 +08:00
|
|
|
devServer: {
|
|
|
|
inline: true,
|
|
|
|
open: true,
|
|
|
|
hot: true,
|
|
|
|
overlay: true,
|
|
|
|
},
|
|
|
|
};
|