This repository was archived by the owner on Jan 18, 2022. It is now read-only.
This repository was archived by the owner on Jan 18, 2022. It is now read-only.
Version 4.1.3 cannot run #198
Closed
Description
Expected behavior
The latest version (4.1.3) can run normally
Actual behavior
There are two problems:
-
I wrote this last Friday (version 4.1.0) and succeeded.
const vue = require('rollup-plugin-vue')
When I updated this morning (version 4.1.3), it threw an exception:
vue is not a function
After looking up the dist codes, I found that we should modify it to
const vue = require('rollup-plugin-vue').default
-
After doing above, there is still a problem remained:
[!] (vue.delegate plugin) TypeError: Cannot read property 'stringify' of undefined src\page\vue-components\AppShell.vue TypeError: Cannot read property 'stringify' of undefined at Object.exports.createVuePartRequest (D:\mip-project\mip\node_modules\_rollup-plugin-vue@4.1.3 @rollup-plugin-vue\dist\utils.js:41:72) at ...
createVuePartRequest
fromdist/util.js
, containsreturn `${path.basename(filename)}.${lang}?${querystring_1.default.stringify(query)}`;
where
querystring_1
equals torequire('querystring')
.The key point is that
querystring
package uses CommonJs, not ES6 module. Below isnode_modules/querystring/index.js
:exports.decode = exports.parse = require('./decode'); exports.encode = exports.stringify = require('./encode');
I don't know whether this is a source code bug or a build problem.
Steps to reproduce the behavior
Just use rollup-plugin-vue with empty config.
const vue = require('rollup-plugin-vue').default;
module.exports = {
...
plugins: [
...
vue()
]
}
...
Metadata
Metadata
Assignees
Labels
No labels