react-dnd-crop
Version:
React custom Drag and drop with Cropper
43 lines (42 loc) • 904 B
JavaScript
const path = require("path");
require("babel-core/register");
require("babel-polyfill");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const htmlWebpackPlugin = new HtmlWebpackPlugin({
template: path.join(__dirname, "lib/index.html"),
filename: "./index.html"
});
module.exports = {
entry: ["babel-polyfill", path.join(__dirname, "lib/index.js")],
module: {
rules: [
{
test: /\.(js|jsx)$/,
use: "babel-loader",
exclude: /node_modules/
},
{
test: /\.css$/,
use: ["style-loader", "css-loader"]
},
{
test: /\.svg$/,
use: [
{
loader: "svg-url-loader",
options: {
limit: 10000
}
}
]
}
]
},
plugins: [htmlWebpackPlugin],
resolve: {
extensions: [".js", ".jsx"]
},
devServer: {
port: 3000
}
};