Skip to content
This repository was archived by the owner on Sep 1, 2024. It is now read-only.
This repository was archived by the owner on Sep 1, 2024. It is now read-only.

Uncaught TypeError: __webpack_require__(...) is not a function #25

@Arsync

Description

@Arsync

Just placed in my vue.config.js and was runned. In module.exports of vue.config.js:

pluginOptions: {
	dll: {
		entry: [
			'vue',
			'vue-i18n',
			'vue-router',
			'vuex',
			'vuex-router-sync',
			//'vuetify/lib'
			//'vuetify/src/stylus/app.styl',
			'@fortawesome/fontawesome-svg-core',
			'@fortawesome/vue-fontawesome',
			'@fortawesome/free-solid-svg-icons'
		],
		open: process.env.NODE_ENV === 'development'
	}
}

In vue.config.js, configureWebpack:

target: TARGET_NODE ? 'node' : 'web',
output: {
  libraryExport: 'default',
  libraryTarget: TARGET_NODE
    ? 'commonjs2'
    : undefined
},

In browser's console:

vue.runtime.esm.js from dll-reference dll_library:1 Uncaught TypeError: __webpack_require__(...) is not a function
    at Object../node_modules/vue/dist/vue.runtime.esm.js (vue.runtime.esm.js from dll-reference dll_library:1)
    at __webpack_require__ (bootstrap:766)
    at fn (bootstrap:129)
    at Module../src/entry-client.js (entry-client.js:1)
    at __webpack_require__ (bootstrap:766)
    at fn (bootstrap:129)
    at Object.0 (client.7d0247628d2d6e6f84cf.js:35021)
    at __webpack_require__ (bootstrap:766)
    at bootstrap:901
    at bootstrap:901

In babel.config.js:

const presets = [[ '@vue/app', { modules: false, useBuiltIns: false } ]];
module.exports = {
    presets,
    plugins: [ '@babel/plugin-syntax-dynamic-import' ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions