You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Build a vue webcomonent via vue-cli-service build --target wc
Try to import this webcomponent in a storybook stories.js file via import './dist/my-vue-comp.js';
Running storybook:build leads to Error:
info => Compiling preview..
ERR! => Failed to build the preview
ERR! ./packages/my-vue-comp/dist/my-vue-comp.js
ERR! Module build failed (from ./node_modules/babel-loader/lib/index.js):
ERR! Error: mono-cli/packages/my-vue-comp/dist/my-vue-comp.js: don't know how to turn this value into a node: function split() { [native code] }
ERR! at Object.valueToNode (mono-cli/node_modules/@babel/types/lib/converters/valueToNode.js:87:9)
ERR! at PluginPass.Expression (mono-cli/node_modules/babel-plugin-minify-constant-folding/lib/index.js:195:26)
What is expected?
build passes
What is actually happening?
build is failing
This code in the dist/my-vue-comp.js file seems to cause the issue.
Uncommenting this will pass the storybook:build
// fallback for non-array-like ES3 and non-enumerable old V8 strings
module.exports = fails(function () {
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
// eslint-disable-next-line no-prototype-builtins
return !Object('z').propertyIsEnumerable(0);
}) ? function (it) {
return classof(it) == 'String' ? split.call(it, '') : Object(it);
} : Object;
The text was updated successfully, but these errors were encountered:
Sorry but we need a minimal runnable reproduction to see what's going wrong in your project. A simple piece of sample code is not enough for us to inspect.
Version
4.3.1
Environment info
Steps to reproduce
Build a vue webcomonent via
vue-cli-service build --target wc
Try to import this webcomponent in a storybook stories.js file via
import './dist/my-vue-comp.js';
Running storybook:build leads to Error:
What is expected?
build passes
What is actually happening?
build is failing
This code in the dist/my-vue-comp.js file seems to cause the issue.
Uncommenting this will pass the storybook:build
The text was updated successfully, but these errors were encountered: