Skip to content

Vedor file? #294

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
Antoshjkee opened this issue Jun 5, 2017 · 3 comments
Closed

Vedor file? #294

Antoshjkee opened this issue Jun 5, 2017 · 3 comments

Comments

@Antoshjkee
Copy link

Antoshjkee commented Jun 5, 2017

Hello people, I'm not really good with webpack, but in previous version this template had vendor file where you add all your npm libraries to it. Its gone now. Where and how to add them?

I am trying to add this editor https://www.froala.com/wysiwyg-editor/docs/framework-plugins/angular2#installation-instructions

P.S. I have tried to install JQuery, but i get this
"jQuery requires a window with a document"

@MarkPieszak
Copy link
Member

Vendor file coming!
For now you just want to include jQuery only in main.browser, and make sure that any use of it anywhere is wrapped in isPlatformBrowser() tests (see FAQ), make sure you have declare var $: any; in any component that uses it as well, and make sure you have the $ added to webpack plugins so it's aware of what it is.

@consigliory
Copy link

any news?

@JohnGalt1717
Copy link

From what I can tell adding a vendor fil using webpack.DllReferencePlugin causes code splitting to stop working.

I've created my vendor file and it compiles fine but then when I go to use it like so:

    plugins: [
        new webpack.DllReferencePlugin({
            context: __dirname,
            manifest: require('./wwwroot/dist/vendor-manifest.json'),
            sourceType: 'commonjs2',
            name: './vendor'
        }),
        getAotPlugin('client', options.aot)

In the webpack.config under the clientConfig Section what happens is that the splits don't get built. It gets built into one file and the splits are dropped (not in the single file either)

Oddly it does work properly with the server version.

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

No branches or pull requests

4 participants