babel-plugin-jsx/scripts/webpack.base.conf.js

47 lines
1002 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');
const HtmlWebpackPlugin = require('html-webpack-plugin');
2020-06-13 11:23:47 +08:00
module.exports = {
mode: 'development',
devtool: 'cheap-module-eval-source-map',
context: path.join(__dirname, '../packages/jsx-explorer'),
2020-06-13 11:23:47 +08:00
entry: './src/index.js',
output: {
publicPath: './',
2020-06-13 11:23:47 +08:00
},
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',
],
},
],
},
plugins: [
new MonacoWebpackPlugin(),
new HtmlWebpackPlugin({
template: 'index.html',
filename: 'index.html',
}),
2020-06-13 11:23:47 +08:00
],
node: {
fs: 'empty',
},
};