Skip to content
New issue

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

Webpack the extension 🎁 #10

Merged
merged 1 commit into from
Nov 13, 2020

Conversation

ryanraposo
Copy link
Contributor

@ryanraposo ryanraposo commented Nov 13, 2020

Changes are based on this guide:

  • Add webpack, webpack-cli, and ts-loader as devDependencies.
  • Update npm scripts so that webpack is used for development.
  • Update the debugger configuration launch.json file.
  • Add and tweak the webpack.config.js configuration file.
  • Update .vscodeignore to exclude node_modules and intermediate output files.

Let me know your specific/alternative plans for bundling (#9). Thanks!

@ryanraposo ryanraposo marked this pull request as draft November 13, 2020 16:07
@ryanraposo ryanraposo marked this pull request as ready for review November 13, 2020 16:07
@AssisrMatheus AssisrMatheus changed the base branch from main to webpack November 13, 2020 22:09
@AssisrMatheus
Copy link
Owner

Thank you for the PR! Though the bundling work, the final objective that I wanted with bundling is that I wanted access to external libraries from node_modules. If you look at it, you can see that I had to copy the .js files to the media/lib folder. Then I read them here:

const purifyUri = webview.asWebviewUri(vscode.Uri.joinPath(this._extensionUri, 'media', 'lib', 'purify.min.js'));

With the bundling, I could also copy those libs from node_modules directly(and potentially the fonts too, at the latex branch)

But this is a great start! And bundling the extension is always good, since it make things faster for everyone. I ran on my machine and looks like everything is working fine.

I'm merging it to a separate branch just to add the dist folder to .gitignore as I think you missed that. Then I'll merge to main

@AssisrMatheus AssisrMatheus merged commit 1e6968d into AssisrMatheus:webpack Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants