2020-06-13 11:23:47 +08:00
|
|
|
const path = require('path');
|
2020-06-17 19:57:37 +08:00
|
|
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
2020-06-13 11:23:47 +08:00
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
mode: 'development',
|
2020-07-09 20:51:47 +08:00
|
|
|
devtool: false,
|
2020-06-17 19:57:37 +08:00
|
|
|
context: path.join(__dirname, '../packages/jsx-explorer'),
|
2020-07-09 20:51:47 +08:00
|
|
|
entry: './src/index.ts',
|
2020-06-13 11:23:47 +08:00
|
|
|
output: {
|
2020-06-17 19:57:37 +08:00
|
|
|
publicPath: './',
|
2020-06-13 11:23:47 +08:00
|
|
|
},
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
2020-07-09 20:51:47 +08:00
|
|
|
test: /\.tsx?$/,
|
|
|
|
loader: 'ts-loader',
|
2020-06-13 11:23:47 +08:00
|
|
|
exclude: /node_modules/,
|
2020-07-09 20:51:47 +08:00
|
|
|
options: {
|
2021-09-22 10:27:50 +08:00
|
|
|
transpileOnly: true,
|
2020-07-09 20:51:47 +08:00
|
|
|
compilerOptions: { downlevelIteration: true },
|
|
|
|
},
|
2020-06-13 11:23:47 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.css$/,
|
|
|
|
use: [
|
|
|
|
'style-loader', 'css-loader',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
plugins: [
|
2020-06-17 19:57:37 +08:00
|
|
|
new HtmlWebpackPlugin({
|
|
|
|
template: 'index.html',
|
|
|
|
filename: 'index.html',
|
|
|
|
}),
|
2020-06-13 11:23:47 +08:00
|
|
|
],
|
2020-07-09 20:51:47 +08:00
|
|
|
resolve: {
|
|
|
|
extensions: ['.ts', '.js'],
|
|
|
|
},
|
2020-06-13 11:23:47 +08:00
|
|
|
node: {
|
|
|
|
fs: 'empty',
|
|
|
|
},
|
|
|
|
};
|