Skip to content

feat(config): use of webpack externals #2172

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

Closed
wants to merge 2 commits into from

Conversation

MrChoclate
Copy link

fix #2141

@filipesilva
Copy link
Contributor

Putting this PR on hold until I can better investigate #2141

@MrChoclate MrChoclate force-pushed the feat/webpackExternals branch from ba39f73 to 07fb185 Compare October 30, 2016 14:05
@MrChoclate MrChoclate force-pushed the feat/webpackExternals branch from 07fb185 to 7972a86 Compare October 30, 2016 14:25
@gregvis
Copy link

gregvis commented Nov 18, 2016

I require externals for using Angular 2 with Electron.

For example, i'm using an npm library called 'drivelist' which calls a node 'child_process'. The only way I could get this to work with ng-serve is to make 'drivelist' external and have Electron load the module.

For ng serve, i included the external like this to work:

 externals: {
            'drivelist': 'commonjs '+ path.resolve(projectRoot, 'node_modules', 'drivelist'),
           'electron': 'commonjs electron'

        }

Then in Electron, i'm just loading the ng serve url:

win = new BrowserWindow({width: 800, height: 600})
win.loadURL('http://localhost:4200');

@filipesilva
Copy link
Contributor

Closing in favor of #3814

@filipesilva filipesilva closed this Jan 1, 2017
@epieddy
Copy link

epieddy commented Jul 4, 2019

@filipesilva The stuff in #3814 is not related to being able to use the externals configuration of webpack.

We need the options provided in this PR.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proposal: Provide a way to add externals to webpack config
5 participants