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

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

Open
Arsync opened this issue May 19, 2019 · 1 comment
Open

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

Arsync opened this issue May 19, 2019 · 1 comment

Comments

@Arsync
Copy link

Arsync commented May 19, 2019

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' ]
}
@date13
Copy link

date13 commented Jun 5, 2020

I have the same issue when use vuetify,
how to resolve it ???

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants