We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
this is my code
// index.ts import EditorJS from '@editorjs/editorjs'; ...
i run
ncc build index.ts -o ./
result:
/******/ (() => { // webpackBootstrap /******/ 'use strict'; /******/ /* webpack/runtime/compat */ /******/ /******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + '/'; /******/ /************************************************************************/ var __webpack_exports__ = {}; const div = document.createElement('div'); div.id = 'editorjs'; document.body.appendChild(div); module.exports = __webpack_exports__; /******/ })();
when i run in browser , i get
Uncaught (in promise) TypeError: Cannot set properties of undefined (setting 'exports')
error form this code
module.exports = __webpack_exports__;
other error is
__dirname is undefined
error comes from this code
if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + '/';
so how can i compile code run in web ?
The text was updated successfully, but these errors were encountered:
ncc is targeting nodejs runtime, if you want to bundle web related library maybe consider using webpack directly?
Sorry, something went wrong.
ok..
ncc
dist/index
__dirname
No branches or pull requests
this is my code
i run
result:
when i run in browser , i get
error form this code
other error is
error comes from this code
so how can i compile code run in web ?
The text was updated successfully, but these errors were encountered: