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
I can see all required files are inline into 0.index.worker.js
0.index.worker.js
/***/ "./node_modules/@tiddlygit/tiddlywiki/boot sync recursive": /*!******************************************************!*\ !*** ./node_modules/@tiddlygit/tiddlywiki/boot sync ***! \******************************************************/ /*! no static exports found */ /***/ (function(module, exports) { $tw.boot.bootPath = options.bootPath || path.dirname(module.filename); $tw.boot.corePath = path.resolve($tw.boot.bootPath,"../core");
But this seem to causes error on path.dirname(module.filename); it says module.filename is undefined.
path.dirname(module.filename);
module.filename
I log the module, it is
{ i: './node_modules/@tiddlygit/tiddlywiki/boot/boot.js', l: true, exports: { TiddlyWiki: [Function: _boot] }, deprecate: [Function (anonymous)], paths: [], children: [], loaded: [Getter], id: [Getter], webpackPolyfill: 1 }
And I think it will break path.resolve($tw.boot.bootPath,"../core")
path.resolve($tw.boot.bootPath,"../core")
So I think if we keep @tiddlygit/tiddlywiki to be require('@tiddlygit/tiddlywiki') instead of inline it, it will works fine.
@tiddlygit/tiddlywiki
require('@tiddlygit/tiddlywiki')
The text was updated successfully, but these errors were encountered:
Seems setting https://webpack.js.org/configuration/externals/ is not working, the package is still being inlined. not required.
if I use
new webpack.IgnorePlugin({ resourceRegExp: /@tiddlygit\/tiddlywiki/ }), // eslint-disable-next-line @typescript-eslint/no-unsafe-call new ThreadsPlugin({ target: 'electron-node-worker', plugins: [new webpack.IgnorePlugin({ resourceRegExp: /@tiddlygit\/tiddlywiki/ })] }),
it will be webpackMissingModule
!(function webpackMissingModule() { var e = new Error("Cannot find module '@tiddlygit/tiddlywiki'"); e.code = 'MODULE_NOT_FOUND'; throw e; }());
I tried #19 and it is not working anymore in webpack4.
Sorry, something went wrong.
Finally use:
new ExternalsPlugin({ type: 'commonjs', include: path.join(__dirname, 'node_modules'), }), new ThreadsPlugin({ target: 'electron-node-worker', plugins: ['ExternalsPlugin'], }),
No branches or pull requests
I can see all required files are inline into
0.index.worker.js
But this seem to causes error on
path.dirname(module.filename);
it saysmodule.filename
is undefined.I log the module, it is
And I think it will break
path.resolve($tw.boot.bootPath,"../core")
So I think if we keep
@tiddlygit/tiddlywiki
to berequire('@tiddlygit/tiddlywiki')
instead of inline it, it will works fine.The text was updated successfully, but these errors were encountered: