UNPKG

luy

Version:

所谓类```React```框架就是**和React用法一模一样**的框架。其实当初制造这个框架的目的是为了能更好的学习React内部结构,了解其原理而制作的玩具。但是随着框架的渐渐成长,代码越来越多,我还是决定将其发展下去. ![](https://github.com/215566435/Luy/blob/master/luy%20icon2.jpg?raw=true)

54 lines 1.45 kB
const { resolve } = require('path'); const webpack = require('webpack'); module.exports = { context: __dirname, entry: [ // 'react-hot-loader/patch', // 'webpack/hot/only-dev-server', '../luy.js' ], output: { path: resolve(__dirname, '../react'),//打包后的文件存放的地方 filename: "bundle.js",//打包后输出文件的文件名 publicPath: "/", // libraryTarget: 'umd' }, devServer: { contentBase: resolve(__dirname, 'build'), hot: true, publicPath: '/', }, module: { rules: [ { test: /\.jsx?$/, use: [ 'babel-loader', ], exclude: /node_modules/ }, { test: /\.css$/, use: [ 'style-loader', 'css-loader' ], exclude: /node_modules/ }, ], }, plugins: [ // new webpack.HotModuleReplacementPlugin(), // new webpack.NamedModulesPlugin(), new webpack.optimize.UglifyJsPlugin({ compress: { warnings: false } }), new webpack.DefinePlugin({ 'process.env': { NODE_ENV: JSON.stringify(process.env.NODE_ENV), }, }), ], // devtool: "cheap-eval-source-map", };