UNPKG

@accordproject/markdown-editor

Version:

A rich text editor that can read and write markdown text. Based on Slate.js.

63 lines (61 loc) 1.51 kB
/** * webpack.config.js ** */ const path = require('path'); const webpack = require('webpack'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const htmlWebpackPlugin = new HtmlWebpackPlugin({ template: path.join(__dirname, 'examples/src/index.html'), filename: 'examples/index.html', }); module.exports = { entry: path.join(__dirname, 'examples/src/index.js'), externals: { 'styled-components': { commonjs: 'styled-components', commonjs2: 'styled-components', amd: 'styled-components', }, }, output: { path: path.join(__dirname, 'examples/dist'), filename: 'bundle.js', }, module: { rules: [ { test: /\.(js|jsx)$/, use: 'babel-loader', exclude: /node_modules/, }, { test: /\.css$/, use: ['style-loader', 'css-loader'], }, { test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/], loader: require.resolve('url-loader'), options: { limit: 10000, name: 'static/media/[name].[hash:8].[ext]', }, }, { test: [/\.eot$/, /\.ttf$/, /\.svg$/, /\.woff$/, /\.woff2$/], loader: require.resolve('file-loader'), options: { name: 'static/media/[name].[hash:8].[ext]', }, }, ], }, node: { fs: 'empty' }, plugins: [htmlWebpackPlugin, new webpack.IgnorePlugin(/jsdom$/)], resolve: { extensions: ['.js', '.jsx'], }, devServer: { port: 3001, }, };