Vue 3 project strange behaviors

オープン
#126 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
typescript, webpack

調査の方向性

vue.config.js に報告されている Vue 3 プロジェクト設定から始め、示されている webpack-obfuscator のオプションと seed を使ってコンソールエラーを再現します。各設定で selector エラーと charAt エラーを比較し、その後、関連する issue #123 の議論または調査結果を確認します。再現可能な非互換性、またはエラーを防ぐ具体的な除外設定/構成を特定できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

I'm not quite sure how to structure this issue, so here it goes.

I created a Vue 3 project with webpack and typescript, then modified the vue.config.js file and tested some options. I'm not sure if there is a function name or a file I'm expected to exclude somehow.

Seed is 0, most of the time I get console errors, sometimes it works in different ways.

const WebpackObfuscator = require('webpack-obfuscator');
module.exports = {
	transpileDependencies: true,
	configureWebpack: {
		plugins: [
			new WebpackObfuscator({
				compact: true,
				rotateStringArray: true
			})
		]

	}
};

Seed 9055:
image

Seed 905555:
image

Seed 221155
Page empty: Console error:
Uncaught DOMException: Document.querySelector: 'style[data-vue-ssr-id~=\x22449b31f0:0\x22]' is not a valid selector

With more options:

			new WebpackObfuscator({
				compact: true,
				identifierNamesGenerator: 'mangled-shuffled',
				rotateStringArray: true,
				seed: 0,
				selfDefending: true,
				shuffleStringArray: true,
				simplify: true,
				stringArray: true,
				stringArrayIndexesType: [
					'hexadecimal-number'
				],
				stringArrayEncoding: ['base64'],
				stringArrayIndexShift: true,
				stringArrayWrappersCount: 1,
				stringArrayWrappersChainedCalls: true,
				stringArrayWrappersParametersMaxCount: 2,
				stringArrayWrappersType: 'variable',
				stringArrayThreshold: 0.75,
				target: 'browser',
			})

Console error Uncaught TypeError: can't access property "charAt", G is undefined

image

Am I missing something I should be doing ? Or is it an issue with webpack-obfuscator?
Might be related to #123

主要言語
TypeScript
スター
930
フォーク
92
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

javascript-obfuscator/webpack-obfuscator のほかの issue

javascript-obfuscator/webpack-obfuscator の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。