vitejs / vite

Next generation frontend tooling. It's fast!
http://vite.dev
MIT License
68.14k stars 6.15k forks source link

production build hits syntax error from compiler-core.esm-bundler.js in browser js console when attaching vue component #6134

Closed joepagan closed 2 years ago

joepagan commented 2 years ago

Describe the bug

Appreciate this is likely going to be instantly closed, but despite my efforts... my reproduction repo works! and would be very time consuming to setup as near identical as it's a php app using vite..., really struggling to find a solution so I don't know where else to turn would appreciate some pointers to investigate this further.

When running the dev server my app works fine... no issues. When running a production build npm run build, it builds ok, but when viewing a webpage in browser, the js console shows the vendor.js bundle file hits a syntax error.

vendor.6239d719.js:formatted:5230 Uncaught SyntaxError: 23

Of course it's all minified/mangled (and turning minify off in vite config makes no difference), line 23 above:

function Ji(e, t, n, r) {
    const s = new SyntaxError(String(e));
    return s.code = e,
    s.loc = t,
    s
}

I guess sourcemaps are not working as they should here but, I found that this line it complains about is node_modules/@vue/compiler-core/dist/compiler-core.esm-bundler.js:L14.

This unknown SyntaxError is only hit where I try attach a basic vue component to a vue root instance.

"vue": "^3.2.26",
"@vitejs/plugin-legacy": "^1.6.4",
"@vitejs/plugin-vue": "^2.0.0",
"vite": "~2.6.14",

Thanks for your hard work and efforts

Reproduction

will try get the working one public tomorrow, eyes closing involuntarily rn

System Info

PHP app build in docker so my system info probs worthless

System:
    OS: macOS 12.0.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 298.48 MB / 32.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 17.1.0 - ~/.nvm/versions/node/v17.1.0/bin/node
    npm: 8.1.4 - ~/.nvm/versions/node/v17.1.0/bin/npm
  Browsers:
    Chrome: 96.0.4664.110
    Firefox: 95.0
    Safari: 15.1

Docker info:
php8
nginx
vite running in a node:16-alpine container

Used Package Manager

npm

Logs

vite_1        | > buildchain@0.0.0 build
vite_1        | > vite build --debug
vite_1        |
vite_1        | 2021-12-15T23:23:00.656Z vite:config bundled config file loaded in 3671.64ms
vite_1        | 2021-12-15T23:23:00.698Z vite:config using resolved config: {
vite_1        |   base: '/dist/',
vite_1        |   build: {
vite_1        |     target: [ 'es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1' ],
vite_1        |     polyfillModulePreload: true,
vite_1        |     outDir: '../cms/web/dist',
vite_1        |     assetsDir: 'assets',
vite_1        |     assetsInlineLimit: 4096,
vite_1        |     cssCodeSplit: true,
vite_1        |     cssTarget: 'chrome61',
vite_1        |     sourcemap: false,
vite_1        |     rollupOptions: { input: [Object], output: [Array] },
vite_1        |     minify: 'terser',
vite_1        |     terserOptions: {},
vite_1        |     write: true,
vite_1        |     emptyOutDir: true,
vite_1        |     manifest: true,
vite_1        |     lib: false,
vite_1        |     ssr: false,
vite_1        |     ssrManifest: false,
vite_1        |     reportCompressedSize: true,
vite_1        |     chunkSizeWarningLimit: 500,
vite_1        |     watch: null,
vite_1        |     minifiy: false,
vite_1        |     commonjsOptions: { include: [Array], extensions: [Array] },
vite_1        |     dynamicImportVarsOptions: { warnOnError: true, exclude: [Array] }
vite_1        |   },
vite_1        |   optimizeDeps: {
vite_1        |     include: [ '@fawmi/vue-google-maps' ],
vite_1        |     esbuildOptions: { keepNames: undefined, preserveSymlinks: undefined }
vite_1        |   },
vite_1        |   plugins: [
vite_1        |     'alias',
vite_1        |     'svg-loader',
vite_1        |     'vite:modulepreload-polyfill',
vite_1        |     'vite:resolve',
vite_1        |     'vite:html-inline-script-proxy',
vite_1        |     'vite:css',
vite_1        |     'vite:esbuild',
vite_1        |     'vite:json',
vite_1        |     'vite:wasm',
vite_1        |     'vite:worker',
vite_1        |     'vite:asset',
vite_1        |     'vite:legacy-config',
vite_1        |     'vite:legacy-generate-polyfill-chunk',
vite_1        |     'vite:legacy-env',
vite_1        |     'visualizer',
vite_1        |     'node-resolve',
vite_1        |     'vite:eslint',
vite_1        |     'vite:vue',
vite_1        |     'vite:define',
vite_1        |     'vite:css-post',
vite_1        |     'vite:build-html',
vite_1        |     'commonjs',
vite_1        |     'vite:data-uri',
vite_1        |     'rollup-plugin-dynamic-import-variables',
vite_1        |     'vite:asset-import-meta-url',
vite_1        |     'vite:legacy-post-process',
vite_1        |     'vite:build-import-analysis',
vite_1        |     'vite:esbuild-transpile',
vite_1        |     'vite:terser',
vite_1        |     'vite:manifest',
vite_1        |     'vite:reporter',
vite_1        |     'vite:load-fallback'
vite_1        |   ],
vite_1        |   resolve: {
vite_1        |     dedupe: undefined,
vite_1        |     alias: [ [Object], [Object], [Object], [Object], [Object] ]
vite_1        |   },
vite_1        |   server: { fs: { strict: undefined, allow: [Array] } },
vite_1        |   define: {
vite_1        |     'import.meta.env.LEGACY': '__VITE_IS_LEGACY__',
vite_1        |     __VUE_OPTIONS_API__: true,
vite_1        |     __VUE_PROD_DEVTOOLS__: false
vite_1        |   },
vite_1        |   ssr: { external: [ 'vue', '@vue/server-renderer' ] },
vite_1        |   configFile: '/var/www/html/buildchain/vite.config.js',
vite_1        |   configFileDependencies: [ 'vite.config.js' ],
vite_1        |   inlineConfig: {
vite_1        |     root: undefined,
vite_1        |     base: undefined,
vite_1        |     mode: undefined,
vite_1        |     configFile: undefined,
vite_1        |     logLevel: undefined,
vite_1        |     clearScreen: undefined,
vite_1        |     build: {}
vite_1        |   },
vite_1        |   root: '/var/www/html/buildchain',
vite_1        |   publicDir: '/var/www/html/buildchain/public',
vite_1        |   cacheDir: '/var/www/html/buildchain/node_modules/.vite',
vite_1        |   command: 'build',
vite_1        |   mode: 'production',
vite_1        |   isProduction: true,
vite_1        |   env: {
vite_1        |     VITE_DEV_SERVER_PUBLIC: 'https://localhost:3000/',
vite_1        |     VITE_DEV_SERVER_INTERNAL: 'https://vite:3000/',
vite_1        |     BASE_URL: '/dist/',
vite_1        |     MODE: 'production',
vite_1        |     DEV: false,
vite_1        |     PROD: true
vite_1        |   },
vite_1        |   assetsInclude: [Function: assetsInclude],
vite_1        |   logger: {
vite_1        |     hasWarned: false,
vite_1        |     info: [Function: info],
vite_1        |     warn: [Function: warn],
vite_1        |     warnOnce: [Function: warnOnce],
vite_1        |     error: [Function: error],
vite_1        |     clearScreen: [Function: clearScreen],
vite_1        |     hasErrorLogged: [Function: hasErrorLogged]
vite_1        |   },
vite_1        |   createResolver: [Function: createResolver]
vite_1        | }
vite_1        | vite v2.6.14 building for production...
vite_1        | transforming...
vite_1        | 2021-12-15T23:23:08.623Z vite:resolve 9.48ms tailwindcss/base -> /var/www/html/buildchain/node_modules/tailwindcss/base.css
vite_1        | 2021-12-15T23:23:08.684Z vite:resolve 8.15ms tailwindcss/components -> /var/www/html/buildchain/node_modules/tailwindcss/components.css
vite_1        | 2021-12-15T23:23:08.702Z vite:resolve 1.14ms ./components/index.pcss -> /var/www/html/src/css/components/index.pcss
vite_1        | 2021-12-15T23:23:08.765Z vite:resolve 1.83ms base/index.pcss -> /var/www/html/src/css/components/base/index.pcss
vite_1        |
vite_1        |
vite_1        |
vite_1        | warn - You have enabled the JIT engine which is currently in preview.
vite_1        | warn - Preview features are not covered by semver, may introduce breaking changes, and can change at any time.
vite_1        | Source path: /var/www/html/src/css/overrides/grid-component.pcss
vite_1        | Setting up new context...
vite_1        | JIT TOTAL: 103.262ms
vite_1        |
vite_1        |
vite_1        | 2021-12-15T23:23:08.944Z vite:resolve 1.34ms verticalAlign.pcss -> /var/www/html/src/css/components/base/verticalAlign.pcss
vite_1        | 2021-12-15T23:23:08.982Z vite:resolve 1.62ms container.pcss -> /var/www/html/src/css/components/base/container.pcss
vite_1        |
vite_1        |
vite_1        | Source path: /var/www/html/buildchain/node_modules/swiper/swiper.min.css
vite_1        | JIT TOTAL: 6.748ms
vite_1        |
vite_1        |
vite_1        |
vite_1        |
vite_1        | Source path: /var/www/html/buildchain/node_modules/swiper/modules/pagination/pagination.min.css
vite_1        | JIT TOTAL: 6.784ms
vite_1        |
vite_1        |
vite_1        |
vite_1        |
vite_1        | Source path: /var/www/html/buildchain/node_modules/swiper/modules/effect-fade/effect-fade.min.css
vite_1        | JIT TOTAL: 4.692ms
vite_1        |
vite_1        |
vite_1        |
vite_1        |
vite_1        | Source path: /var/www/html/buildchain/node_modules/swiper/modules/autoplay/autoplay.min.css
vite_1        | JIT TOTAL: 4.101ms
vite_1        |
vite_1        |
vite_1        | 2021-12-15T23:23:09.219Z vite:resolve 1.68ms cards/index.pcss -> /var/www/html/src/css/components/cards/index.pcss
vite_1        |
vite_1        |
vite_1        | Source path: /var/www/html/buildchain/node_modules/swiper/modules/navigation/navigation.min.css
vite_1        | JIT TOTAL: 3.639ms
vite_1        |
vite_1        |
vite_1        | 2021-12-15T23:23:09.558Z vite:resolve 1.79ms categoryListing.pcss -> /var/www/html/src/css/components/cards/categoryListing.pcss
vite_1        | 2021-12-15T23:23:10.008Z vite:resolve 1.83ms forms/index.pcss -> /var/www/html/src/css/components/forms/index.pcss
vite_1        |
vite_1        |
vite_1        | Source path: /var/www/html/buildchain/node_modules/@fawmi/vue-google-maps/src/components/map.vue?vue&type=style&index=0&lang.css
vite_1        | JIT TOTAL: 3.997ms
vite_1        |
vite_1        |
vite_1        | 2021-12-15T23:23:10.167Z vite:resolve 2.25ms input.pcss -> /var/www/html/src/css/components/forms/input.pcss
vite_1        | 2021-12-15T23:23:10.348Z vite:resolve 2.18ms formie.pcss -> /var/www/html/src/css/components/forms/formie.pcss
vite_1        |
vite_1        |
vite_1        | Source path: /var/www/html/buildchain/node_modules/gridjs/dist/theme/mermaid.css
vite_1        | JIT TOTAL: 4.256ms
vite_1        |
vite_1        |
vite_1        | 2021-12-15T23:23:10.497Z vite:resolve 1.99ms global.pcss -> /var/www/html/src/css/components/global.pcss
vite_1        | 2021-12-15T23:23:10.519Z vite:resolve 1.77ms heroes/index.pcss -> /var/www/html/src/css/components/heroes/index.pcss
vite_1        | 2021-12-15T23:23:10.529Z vite:resolve 1.34ms linearGradient.pcss -> /var/www/html/src/css/components/heroes/linearGradient.pcss
vite_1        | 2021-12-15T23:23:10.546Z vite:resolve 1.33ms articleHero.pcss -> /var/www/html/src/css/components/heroes/articleHero.pcss
vite_1        | 2021-12-15T23:23:10.564Z vite:resolve 1.47ms splitImageHero.pcss -> /var/www/html/src/css/components/heroes/splitImageHero.pcss
vite_1        | 2021-12-15T23:23:10.583Z vite:resolve 1.49ms translate.pcss -> /var/www/html/src/css/components/heroes/translate.pcss
vite_1        | 2021-12-15T23:23:10.604Z vite:resolve 1.53ms svgs.pcss -> /var/www/html/src/css/components/svgs.pcss
vite_1        | 2021-12-15T23:23:10.619Z vite:resolve 1.35ms typography.pcss -> /var/www/html/src/css/components/typography.pcss
vite_1        | 2021-12-15T23:23:10.636Z vite:resolve 1.93ms webfonts.pcss -> /var/www/html/src/css/components/webfonts.pcss
vite_1        | 2021-12-15T23:23:10.661Z vite:resolve 1.70ms text/index.pcss -> /var/www/html/src/css/components/text/index.pcss
vite_1        | 2021-12-15T23:23:10.684Z vite:resolve 1.65ms main.pcss -> /var/www/html/src/css/components/text/main.pcss
vite_1        | 2021-12-15T23:23:10.704Z vite:resolve 2.00ms accordion/index.pcss -> /var/www/html/src/css/components/accordion/index.pcss
vite_1        | 2021-12-15T23:23:10.720Z vite:resolve 0.86ms base.pcss -> /var/www/html/src/css/components/accordion/base.pcss
vite_1        | 2021-12-15T23:23:10.736Z vite:resolve 1.65ms svgs/index.pcss -> /var/www/html/src/css/components/svgs/index.pcss
vite_1        | 2021-12-15T23:23:10.755Z vite:resolve 1.47ms tiles.pcss -> /var/www/html/src/css/components/svgs/tiles.pcss
vite_1        | 2021-12-15T23:23:10.774Z vite:resolve 1.97ms base.pcss -> /var/www/html/src/css/components/svgs/base.pcss
vite_1        | 2021-12-15T23:23:10.788Z vite:resolve 1.30ms swiper/index.pcss -> /var/www/html/src/css/components/swiper/index.pcss
vite_1        | 2021-12-15T23:23:10.805Z vite:resolve 1.94ms testimonialSwiper.pcss -> /var/www/html/src/css/components/swiper/testimonialSwiper.pcss
vite_1        | 2021-12-15T23:23:10.818Z vite:resolve 1.78ms promotionSwiper.pcss -> /var/www/html/src/css/components/swiper/promotionSwiper.pcss
vite_1        | 2021-12-15T23:23:10.832Z vite:resolve 2.41ms base.pcss -> /var/www/html/src/css/components/swiper/base.pcss
vite_1        | 2021-12-15T23:23:10.854Z vite:resolve 2.11ms productsVideosSwiper.pcss -> /var/www/html/src/css/components/swiper/productsVideosSwiper.pcss
vite_1        | 2021-12-15T23:23:10.872Z vite:resolve 1.65ms relatedProductsSwiper.pcss -> /var/www/html/src/css/components/swiper/relatedProductsSwiper.pcss
vite_1        | 2021-12-15T23:23:10.888Z vite:resolve 1.89ms ./overrides/index.pcss -> /var/www/html/src/css/overrides/index.pcss
vite_1        | 2021-12-15T23:23:10.904Z vite:resolve 0.30ms grid-component.pcss -> /var/www/html/src/css/overrides/grid-component.pcss
vite_1        | 2021-12-15T23:23:10.930Z vite:resolve 11.88ms tailwindcss/utilities -> /var/www/html/buildchain/node_modules/tailwindcss/utilities.css
vite_1        | 2021-12-15T23:23:10.953Z vite:resolve 2.05ms ./pages/index.pcss -> /var/www/html/src/css/pages/index.pcss
vite_1        | 2021-12-15T23:23:10.964Z vite:resolve 2.47ms welcome.pcss -> /var/www/html/src/css/pages/welcome.pcss
vite_1        | 2021-12-15T23:23:10.975Z vite:resolve 2.03ms vendor.pcss -> /var/www/html/src/css/vendor.pcss
vite_1        |
vite_1        |
vite_1        | Source path: /var/www/html/src/css/app.pcss
vite_1        | Setting up new context...
vite_1        | Finding changed files: 236.815ms
vite_1        | Generate rules: 106.021ms
vite_1        | Build stylesheet: 4.044ms
vite_1        | Potential classes:  8558
vite_1        | Active contexts:  2
vite_1        | Content match entries 3681
vite_1        | JIT TOTAL: 791.52ms
vite_1        |
vite_1        |
vite_1        | 2021-12-15T23:23:11.870Z vite:resolve 36.91ms /src/images/downCarat.svg -> /var/www/html/src/images/downCarat.svg
vite_1        | 2021-12-15T23:23:11.870Z vite:resolve 37.00ms /src/images/plusSignWhite.svg -> /var/www/html/src/images/plusSignWhite.svg
vite_1        | 2021-12-15T23:23:11.870Z vite:resolve 37.02ms /src/images/minusSignBlue.svg -> /var/www/html/src/images/minusSignBlue.svg
vite_1        | 2021-12-15T23:23:11.871Z vite:resolve 37.02ms /src/images/heroGradientBlue.svg -> /var/www/html/src/images/heroGradientBlue.svg
vite_1        | 2021-12-15T23:23:11.871Z vite:resolve 37.03ms /src/images/heroSecondaryBlue.svg -> /var/www/html/src/images/heroSecondaryBlue.svg
vite_1        | 2021-12-15T23:23:11.871Z vite:resolve 37.04ms /src/images/bottomOverlay.svg -> /var/www/html/src/images/bottomOverlay.svg
vite_1        | 2021-12-15T23:23:11.871Z vite:resolve 37.06ms /src/images/comingSoonBackground.png -> /var/www/html/src/images/comingSoonBackground.png
vite_1        | ✓ 190 modules transformed.
vite_1        | rendering chunks...
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:build-import-analysis) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:css-post) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:css-post) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:css-post) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (svg-loader) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:define) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:define) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:define) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:define) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:define) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:define) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:define) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:define) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:css-post) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | [@vitejs/plugin-legacy] legacy polyfills: Set(6) {
vite_1        |   'core-js/modules/es.promise',
vite_1        |   'core-js/modules/es.array.iterator',
vite_1        |   'core-js/modules/web.dom-collections.iterator.js',
vite_1        |   'core-js/modules/web.url-search-params.js',
vite_1        |   'core-js/modules/es.string.replace.js',
vite_1        |   'core-js/modules/web.url.to-json.js'
vite_1        | }
vite_1        | 2021-12-15T23:23:17.864Z vite:config using resolved config: {
vite_1        |   root: '/var/www/html/buildchain/node_modules/@vitejs/plugin-legacy',
vite_1        |   configFile: undefined,
vite_1        |   logLevel: 'error',
vite_1        |   plugins: [
vite_1        |     'alias',
vite_1        |     'vite:modulepreload-polyfill',
vite_1        |     'vite:resolve',
vite_1        |     'vite:html-inline-script-proxy',
vite_1        |     'vite:css',
vite_1        |     'vite:esbuild',
vite_1        |     'vite:json',
vite_1        |     'vite:wasm',
vite_1        |     'vite:worker',
vite_1        |     'vite:asset',
vite_1        |     'vite:legacy-polyfills',
vite_1        |     'vite:define',
vite_1        |     'vite:css-post',
vite_1        |     'vite:build-html',
vite_1        |     'commonjs',
vite_1        |     'vite:data-uri',
vite_1        |     'rollup-plugin-dynamic-import-variables',
vite_1        |     'vite:asset-import-meta-url',
vite_1        |     'vite:build-import-analysis',
vite_1        |     'vite:esbuild-transpile',
vite_1        |     'vite:terser',
vite_1        |     'vite:reporter',
vite_1        |     'vite:load-fallback'
vite_1        |   ],
vite_1        |   build: {
vite_1        |     target: false,
vite_1        |     polyfillModulePreload: true,
vite_1        |     outDir: 'dist',
vite_1        |     assetsDir: 'assets',
vite_1        |     assetsInlineLimit: 4096,
vite_1        |     cssCodeSplit: true,
vite_1        |     cssTarget: false,
vite_1        |     sourcemap: false,
vite_1        |     rollupOptions: { input: [Object], output: [Object] },
vite_1        |     minify: 'terser',
vite_1        |     terserOptions: {},
vite_1        |     write: false,
vite_1        |     emptyOutDir: null,
vite_1        |     manifest: false,
vite_1        |     lib: false,
vite_1        |     ssr: false,
vite_1        |     ssrManifest: false,
vite_1        |     reportCompressedSize: true,
vite_1        |     chunkSizeWarningLimit: 500,
vite_1        |     watch: null,
vite_1        |     commonjsOptions: { include: [Array], extensions: [Array] },
vite_1        |     dynamicImportVarsOptions: { warnOnError: true, exclude: [Array] }
vite_1        |   },
vite_1        |   configFileDependencies: [],
vite_1        |   inlineConfig: {
vite_1        |     root: '/var/www/html/buildchain/node_modules/@vitejs/plugin-legacy',
vite_1        |     configFile: false,
vite_1        |     logLevel: 'error',
vite_1        |     plugins: [ [Object] ],
vite_1        |     build: {
vite_1        |       write: false,
vite_1        |       target: false,
vite_1        |       minify: 'terser',
vite_1        |       assetsDir: 'assets',
vite_1        |       rollupOptions: [Object]
vite_1        |     }
vite_1        |   },
vite_1        |   base: '/',
vite_1        |   resolve: { dedupe: undefined, alias: [ [Object], [Object] ] },
vite_1        |   publicDir: '/var/www/html/buildchain/node_modules/@vitejs/plugin-legacy/public',
vite_1        |   cacheDir: '/var/www/html/buildchain/node_modules/@vitejs/plugin-legacy/node_modules/.vite',
vite_1        |   command: 'build',
vite_1        |   mode: 'production',
vite_1        |   isProduction: true,
vite_1        |   server: { fs: { strict: undefined, allow: [Array] } },
vite_1        |   env: {
vite_1        |     VITE_DEV_SERVER_PUBLIC: 'https://localhost:3000/',
vite_1        |     VITE_DEV_SERVER_INTERNAL: 'https://vite:3000/',
vite_1        |     BASE_URL: '/',
vite_1        |     MODE: 'production',
vite_1        |     DEV: false,
vite_1        |     PROD: true
vite_1        |   },
vite_1        |   assetsInclude: [Function: assetsInclude],
vite_1        |   logger: {
vite_1        |     hasWarned: false,
vite_1        |     info: [Function: info],
vite_1        |     warn: [Function: warn],
vite_1        |     warnOnce: [Function: warnOnce],
vite_1        |     error: [Function: error],
vite_1        |     clearScreen: [Function: clearScreen],
vite_1        |     hasErrorLogged: [Function: hasErrorLogged]
vite_1        |   },
vite_1        |   createResolver: [Function: createResolver],
vite_1        |   optimizeDeps: {
vite_1        |     esbuildOptions: { keepNames: undefined, preserveSymlinks: undefined }
vite_1        |   }
vite_1        | }
vite_1        | ../cms/web/dist/assets/checkout-legacy.840f111e.js            0.23 KiB / gzip: 0.18 KiB
vite_1        | ../cms/web/dist/assets/checkout-legacy.840f111e.js.map        0.11 KiB
vite_1        | ../cms/web/dist/assets/cart-legacy.c0f21828.js                0.23 KiB / gzip: 0.18 KiB
vite_1        | ../cms/web/dist/assets/cart-legacy.c0f21828.js.map            0.10 KiB
vite_1        | ../cms/web/dist/assets/customer-legacy.d3269478.js            11.56 KiB / gzip: 3.77 KiB
vite_1        | ../cms/web/dist/assets/customer-legacy.d3269478.js.map        0.11 KiB
vite_1        | ../cms/web/dist/assets/home-legacy.bca6183f.js                12.29 KiB / gzip: 4.04 KiB
vite_1        | ../cms/web/dist/assets/home-legacy.bca6183f.js.map            0.10 KiB
vite_1        | ../cms/web/dist/assets/payment-legacy.2429f31b.js             1.12 KiB / gzip: 0.55 KiB
vite_1        | ../cms/web/dist/assets/payment-legacy.2429f31b.js.map         0.10 KiB
vite_1        | ../cms/web/dist/assets/login-legacy.fa2d20c9.js               0.23 KiB / gzip: 0.18 KiB
vite_1        | ../cms/web/dist/assets/login-legacy.fa2d20c9.js.map           0.10 KiB
vite_1        | ../cms/web/dist/assets/styleguide-legacy.1e8e7a2f.js          0.23 KiB / gzip: 0.19 KiB
vite_1        | ../cms/web/dist/assets/styleguide-legacy.1e8e7a2f.js.map      0.11 KiB
vite_1        | ../cms/web/dist/assets/faqs-legacy.965c6770.js                0.78 KiB / gzip: 0.42 KiB
vite_1        | ../cms/web/dist/assets/faqs-legacy.965c6770.js.map            0.10 KiB
vite_1        | ../cms/web/dist/assets/product-index-legacy.20e31dd7.js       1.14 KiB / gzip: 0.59 KiB
vite_1        | ../cms/web/dist/assets/product-index-legacy.20e31dd7.js.map   0.11 KiB
vite_1        | ../cms/web/dist/assets/product-legacy.bd14585b.js             0.51 KiB / gzip: 0.34 KiB
vite_1        | ../cms/web/dist/assets/product-legacy.bd14585b.js.map         0.10 KiB
vite_1        | ../cms/web/dist/assets/locate-a-stockist-legacy.fd3e65a5.js   2.62 KiB / gzip: 1.32 KiB
vite_1        | ../cms/web/dist/assets/locate-a-stockist-legacy.fd3e65a5.js.map 0.11 KiB
vite_1        | ../cms/web/dist/assets/footer-legacy.8d950af4.js              4.85 KiB / gzip: 1.67 KiB
vite_1        | ../cms/web/dist/assets/footer-legacy.8d950af4.js.map          0.10 KiB
vite_1        | ../cms/web/dist/assets/FooterToTop-legacy.d73bbfff.js         0.35 KiB / gzip: 0.26 KiB
vite_1        | ../cms/web/dist/assets/FooterToTop-legacy.d73bbfff.js.map     0.11 KiB
vite_1        | ../cms/web/dist/assets/polyfills-legacy.0641cb10.js           40.35 KiB / gzip: 16.87 KiB
vite_1        | ../cms/web/dist/assets/vendor-legacy.f5647bab.js              304.70 KiB / gzip: 98.17 KiB
vite_1        | ../cms/web/dist/assets/vendor-legacy.f5647bab.js.map          0.11 KiB
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:legacy-post-process) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:legacy-post-process) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:legacy-post-process) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:legacy-post-process) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:legacy-post-process) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:legacy-post-process) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:legacy-post-process) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:legacy-post-process) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:legacy-post-process) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:legacy-post-process) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:legacy-post-process) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:legacy-post-process) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (svg-loader) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:legacy-post-process) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:legacy-post-process) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:build-import-analysis) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:define) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:define) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:define) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:define) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:define) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:define) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:define) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:define) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | Sourcemap is likely to be incorrect: a plugin (vite:legacy-post-process) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
vite_1        | ../cms/web/dist/assets/marker.568006d2.svg                 1.49 KiB
vite_1        | ../cms/web/dist/assets/downCarat.6390f440.svg              0.23 KiB
vite_1        | ../cms/web/dist/assets/plusSignWhite.439a708b.svg          0.61 KiB
vite_1        | ../cms/web/dist/assets/minusSignBlue.89be9766.svg          0.33 KiB
vite_1        | ../cms/web/dist/assets/heroGradientBlue.dcbafcc7.svg       0.71 KiB
vite_1        | ../cms/web/dist/assets/heroSecondaryBlue.62f76587.svg      0.71 KiB
vite_1        | ../cms/web/dist/assets/bottomOverlay.4647ab94.svg          1.02 KiB
vite_1        | ../cms/web/dist/assets/comingSoonBackground.e49143dd.png   4.80 KiB
vite_1        | ../cms/web/dist/manifest.json                              6.78 KiB
vite_1        | ../cms/web/dist/assets/cart.de3a9ada.js                    0.17 KiB / gzip: 0.15 KiB
vite_1        | ../cms/web/dist/assets/cart.de3a9ada.js.map                0.09 KiB
vite_1        | ../cms/web/dist/assets/checkout.a8f5358b.js                0.17 KiB / gzip: 0.15 KiB
vite_1        | ../cms/web/dist/assets/checkout.a8f5358b.js.map            0.10 KiB
vite_1        | ../cms/web/dist/assets/customer.87810b67.js                2.60 KiB / gzip: 1.00 KiB
vite_1        | ../cms/web/dist/assets/customer.87810b67.js.map            0.10 KiB
vite_1        | ../cms/web/dist/assets/home.aede5f11.js                    0.89 KiB / gzip: 0.50 KiB
vite_1        | ../cms/web/dist/assets/home.aede5f11.js.map                0.09 KiB
vite_1        | ../cms/web/dist/assets/login.19227f5c.js                   0.17 KiB / gzip: 0.15 KiB
vite_1        | ../cms/web/dist/assets/login.19227f5c.js.map               0.10 KiB
vite_1        | ../cms/web/dist/assets/styleguide.b86999da.js              0.19 KiB / gzip: 0.17 KiB
vite_1        | ../cms/web/dist/assets/styleguide.b86999da.js.map          0.10 KiB
vite_1        | ../cms/web/dist/assets/payment.076e77b0.js                 1.06 KiB / gzip: 0.54 KiB
vite_1        | ../cms/web/dist/assets/payment.076e77b0.js.map             0.10 KiB
vite_1        | ../cms/web/dist/assets/faqs.5b536d87.js                    0.73 KiB / gzip: 0.41 KiB
vite_1        | ../cms/web/dist/assets/faqs.5b536d87.js.map                0.09 KiB
vite_1        | ../cms/web/dist/assets/product-index.66628d6b.js           1.07 KiB / gzip: 0.57 KiB
vite_1        | ../cms/web/dist/assets/product-index.66628d6b.js.map       0.10 KiB
vite_1        | ../cms/web/dist/assets/product.5dc2067a.js                 0.45 KiB / gzip: 0.33 KiB
vite_1        | ../cms/web/dist/assets/product.5dc2067a.js.map             0.10 KiB
vite_1        | ../cms/web/dist/assets/locate-a-stockist.0e14e60c.js       2.55 KiB / gzip: 1.31 KiB
vite_1        | ../cms/web/dist/assets/locate-a-stockist.0e14e60c.js.map   0.11 KiB
vite_1        | ../cms/web/dist/assets/footer.75f1e2b7.js                  5.32 KiB / gzip: 1.90 KiB
vite_1        | ../cms/web/dist/assets/footer.75f1e2b7.js.map              0.10 KiB
vite_1        | ../cms/web/dist/assets/FooterToTop.36792288.js             0.26 KiB / gzip: 0.22 KiB
vite_1        | ../cms/web/dist/assets/FooterToTop.36792288.js.map         0.10 KiB
vite_1        | ../cms/web/dist/assets/vendor.7b2ec8d5.css                 0.05 KiB / gzip: 0.06 KiB
vite_1        | ../cms/web/dist/assets/customer.75e8b4f1.css               8.81 KiB / gzip: 2.72 KiB
vite_1        | ../cms/web/dist/assets/home.6bbb97e0.css                   11.25 KiB / gzip: 3.50 KiB
vite_1        | ../cms/web/dist/assets/app.009e9ad1.css                    51.72 KiB / gzip: 9.86 KiB
vite_1        | ../cms/web/dist/assets/vendor.eb575819.js                  305.12 KiB / gzip: 97.80 KiB
vite_1        | ../cms/web/dist/assets/vendor.eb575819.js.map              0.10 KiB
vite_1        | npm notice
vite_1        | npm notice New minor version of npm available! 8.1.2 -> 8.3.0
vite_1        | npm notice Changelog: <https://github.com/npm/cli/releases/tag/v8.3.0>
vite_1        | npm notice Run `npm install -g npm@8.3.0` to update!
vite_1        | npm notice

Validations

joepagan commented 2 years ago

I found that this was linked to a dynamic content issue... causing a template error. A new line being added to an inline property in the markup specifically. This was revealed while running the dev-server when I finally had matching content across environments.

Unfortunately though... having cleared 100% of Vue warnings in the js console where dev server is running, then trying production build locally, I get a slightly different one vendor.a9b4a9a1.js:formatted:5262 Uncaught SyntaxError: 15.

Is there a way to make these errors way more verbose on production builds?

joepagan commented 2 years ago

Aaaaaand... figured out WHY, it was my php application minifying the markup that the vue components use as their templates. Of course this is entirely why I could not see the issue on anything but uat/production environments.

The contents of a <script type="text/x-template"> were over minified and the inline properties have no spaces which of course is an issue and wouldn't expect vue to make sense of that. As an example:

<script type="text/x-template" id="t-product-purchase-cta"><div><div v-if="customer"><div v-if="isAvailabileInCurrentZone"><product-price:sku="sku":sale-price="salePrice"></product-price>
...

This has already been opened as an issue on https://github.com/mrclay/minify/issues/674

I'll close this now