UNPKG

@piscium2010/v-form

Version:

This is not a form, instead it is only a form shell of which the single responsibility is validating and providing error messages. Capable of definding flexiable rules and validating multi fields at a time.

45 lines (43 loc) 1.13 kB
const path = require('path'); const { CleanWebpackPlugin } = require('clean-webpack-plugin') const HtmlWebpackPlugin = require('html-webpack-plugin') module.exports = { output: { filename: '[name].[hash].bundle.js', path: path.resolve(__dirname, 'public') }, resolve: { alias: { 'v-form': path.join(__dirname, './src'), }, modules: ['./node_modules','node_modules'], extensions: ['.js', '.jsx'] }, module: { rules: [ { test: /\.(png|jpg|gif|woff2|woff|eot|svg|ttf)$/i, use: [ { loader: 'url-loader', options: { limit: 8192 } } ] }, { test: /\.jsx?/, exclude: /node_modules/, loader: 'babel-loader', } ] }, plugins: [ new CleanWebpackPlugin() ], externals: { react: 'React', ['react-dom']: 'ReactDOM' } }