babel-plugin-jsx/packages/jsx-explorer/webpack.config.js

48 lines
924 B
JavaScript
Raw Normal View History

2020-06-13 11:23:47 +08:00
const path = require('path');
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
module.exports = {
mode: 'development',
devtool: 'cheap-module-eval-source-map',
entry: './src/index.js',
output: {
path: path.resolve(__dirname, './dist'),
publicPath: '/dist/',
},
module: {
rules: [
{
test: /\.jsx?$/,
loader: 'babel-loader',
exclude: /node_modules/,
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: 'dist/fonts/[name].[hash:7].[ext]',
},
},
{
test: /\.css$/,
use: [
'style-loader', 'css-loader',
],
},
],
},
devServer: {
inline: true,
open: true,
hot: true,
overlay: true,
},
plugins: [
new MonacoWebpackPlugin(),
],
node: {
fs: 'empty',
},
};