Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: conversion of html generated by html-webpack-plugin #88

Merged
merged 28 commits into from
Feb 17, 2022

Conversation

konpeki622
Copy link
Contributor

@konpeki622 konpeki622 commented Jan 28, 2022

Related to #83

transform functional webpack config with AST

  • The webpackConfigure and chainWebpack options could be defined as object or function in vue.config.js module
  • To avoid calling error when they were functional, I initialize config options and generate a temporary file (vue.temp.config.js) to reconfig html-webpack-plugin

AST

  • FindWebpackConfigProperties: initialize config options according to functional webpackConfigure
  • FindHtmlPluginChain: parse chainWebpack
  • ChainWebpackTransformation: generate a temporary file (vue.temp.config.js) to reconfig html-webpack-plugin
  • FindHtmlConfigProperties: reparse chainWebpack and initialize options for html plugin

html-webpack-plugin is supported

  • Options will be applied to plugin vite-plugin-html
  • Variables injected to index.html will be transformed. for example, <%= htmlWebpackPlugin.options.title %> -> <%= title %>
  • Import injectHtml and minifyHtml from html-webpack-plugin

support these options:

  • title
  • template
  • favicon
  • minify
  • publicPath
  • templateContent
  • templateParameter

Thank you for your review. I will add test use cases.

@Chieffo2021 Chieffo2021 linked an issue Feb 10, 2022 that may be closed by this pull request
12 tasks
README-zh.md Outdated Show resolved Hide resolved
README-zh.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
tests/astParse.test.ts Outdated Show resolved Hide resolved
src/ast-parse/astParse.ts Outdated Show resolved Hide resolved
src/config/parse.ts Outdated Show resolved Hide resolved
src/ast-parse/astParse.ts Outdated Show resolved Hide resolved
src/transform/transformVuecli.ts Outdated Show resolved Hide resolved
@Chieffo2021

This comment was marked as resolved.

tsconfig.json Show resolved Hide resolved
src/ast-parse/astParse.ts Outdated Show resolved Hide resolved
src/ast-parse/parsers/index.ts Outdated Show resolved Hide resolved
src/ast-parse/astParse.ts Show resolved Hide resolved
src/ast-parse/astParse.ts Show resolved Hide resolved
src/ast-parse/astParse.ts Show resolved Hide resolved
@Chieffo2021 Chieffo2021 merged commit 302c813 into originjs:main Feb 17, 2022
@konpeki622 konpeki622 deleted the feat/html branch March 26, 2022 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Conversion of html generated by html-webpack-plugin
2 participants