Reduce size of glimmer plugin (#13698)

This commit is contained in:
fisker Cheung authored and GitHub committed 2022-10-22 23:35:19 +08:00
1 parent 9cf73d3610
commit 36460d5fd6
1 file changed
+18
+18
View File
@@ -206,6 +206,24 @@ const pluginFiles = [
"@glimmer/syntax/dist/modules/es2017/lib/parser/tokenizer-event-handlers.js"
),
},
// This passed to plugins, our plugin don't need access to the options
{
module: require.resolve(
"@glimmer/syntax/dist/modules/es2017/lib/parser/tokenizer-event-handlers.js"
),
process: (text) =>
text.replace(/\nconst syntax = \{.*?\n\};/su, "\nconst syntax = {};"),
},
{
module: path.join(
path.dirname(require.resolve("@handlebars/parser/package.json")),
"dist/esm/index.js"
),
path: path.join(
path.dirname(require.resolve("@handlebars/parser/package.json")),
"dist/esm/parse.js"
),
},
],
},
"src/language-html/parser-html.js",