Skip to content

Commit 80f10f9

Browse files
bump(deps): Vue3
update code accordingly * chore: remove babelParserDefaultPlugins (@VUE 646e694f...) * consolidate: webpack config 'consolidate': false this is no longer enough
1 parent 6bbd46e commit 80f10f9

File tree

4 files changed

+119
-204
lines changed

4 files changed

+119
-204
lines changed

build/webpack.config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,15 @@ ${ pkg.name } v${ pkg.version } for vue${ vueTarget }
341341
...isProd ? {
342342
'debug$': Path.resolve(__dirname, 'noopDebug.js'),
343343
} : {},
344+
345+
// Vue3
346+
// exclude ./node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js template engines ('consolidate': false this is no longer enough)
347+
...Object.fromEntries(
348+
'velocityjs,dustjs-linkedin,atpl,liquor,twig,eco,jazz,jqtpl,hamljs,hamlet,whiskers,haml-coffee,hogan.js,templayed,underscore,walrus,mustache,just,ect,mote,toffee,dot,bracket-template,ractive,htmling,babel-core,plates,react-dom/server,react,vash,slm,marko,teacup/lib/express,coffee-script,squirrelly,twing'.split(',')
349+
.map(e => ([e, false]))
350+
)
351+
352+
344353
},
345354

346355
fallback: {

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@
5656
"@types/babel__traverse": "^7.14.0",
5757
"@types/spark-md5": "^3.0.2",
5858
"@vue/babel-helper-vue-jsx-merge-props": "^1.2.1",
59-
"@vue/babel-plugin-jsx": "^1.0.6",
59+
"@vue/babel-plugin-jsx": "^1.1.1",
6060
"@vue/babel-preset-jsx": "^1.2.4",
61-
"@vue/compiler-dom": "^3.1.2",
62-
"@vue/compiler-sfc": "^3.1.2",
63-
"@vue/component-compiler-utils": "^3.2.2",
64-
"@vue/shared": "^3.1.2",
61+
"@vue/compiler-dom": "^3.2.29",
62+
"@vue/compiler-sfc": "^3.2.29",
63+
"@vue/component-compiler-utils": "^3.3.0",
64+
"@vue/shared": "^3.2.29",
6565
"assert": "^2.0.0",
6666
"babel-loader": "^8.2.3",
6767
"babel-plugin-polyfill-corejs3": "^0.5.1",

src/createVue3SFCModule.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ import {
88
SFCTemplateCompileOptions,
99
} from '@vue/compiler-sfc'
1010

11-
import {
12-
babelParserDefaultPlugins as vue_babelParserDefaultPlugins
13-
} from '@vue/shared'
14-
1511
import * as vue_CompilerDOM from '@vue/compiler-dom'
1612

1713
// https://github.com/vuejs/jsx-next
@@ -148,7 +144,7 @@ export async function createSFCModule(source : string, filename : AbstractPath,
148144
if ( compileTemplateOptions !== null )
149145
compileTemplateOptions.compilerOptions.bindingMetadata = scriptBlock.bindings;
150146

151-
return await transformJSCode(scriptBlock.content, true, strFilename, [ ...additionalBabelParserPlugins, ...vue_babelParserDefaultPlugins, 'jsx' ], { ...additionalBabelPlugins, jsx }, log);
147+
return await transformJSCode(scriptBlock.content, true, strFilename, [ ...additionalBabelParserPlugins, 'jsx' ], { ...additionalBabelPlugins, jsx }, log);
152148

153149
});
154150

0 commit comments

Comments
 (0)