UNPKG

yzhanhtmlparser

Version:

A streaming HTML parser based on HTML Standard. 基于 HTML 标准的流式 HTML 解析器

42 lines 877 B
const { resolve } = require('path') const NodePolyfillPlugin = require('node-polyfill-webpack-plugin') module.exports = { mode: 'development', entry: './src/index.js', output: { filename: 'yzhanhtmlparser.min.js', path: resolve('docs'), library: 'yzhanHTMLParser', libraryTarget: 'umd', globalObject: 'this', environment: { arrowFunction: false, bigIntLiteral: false, const: false, destructuring: false, dynamicImport: false, forOf: false, module: false, optionalChaining: false, templateLiteral: false } }, module: { rules: [ { test: /\.js$/, include: resolve('src'), use: ['swc-loader'] } ] }, devServer: { hot: true, open: true, port: 3000, static: resolve('docs'), }, plugins: [ new NodePolyfillPlugin() ] }