Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

convert Systemjs to Webpack

Posted on 2017-03-15
3
Medium Priority
?
357 Views
Last Modified: 2017-03-20
Started angular2 app in a mvc application.
want to upgrade to the latest using webpack Angular Cli.

The application works as is using the app folder in the root and my mvc is called in my views folder and my main layout.cshtml is used here to call my
main page.
 <script>
        System.import('app').catch(function(err){ console.error(err); });
    </script>

my index.cshtml located in my view Home folder.    <callindex-app></callindex-app>

If I use webpack System.import is not supported and that eliminates my index.cshtml from using any of the angular2 functions.

Is there a way I can still call an angular2 application and embed it in a index.cshtml page like I am doing with systemjs angular2
0
Comment
Question by:Seven price
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 59

Accepted Solution

by:
Julian Hansen earned 2000 total points
ID: 42053074
I found this article on the webpack forums
https://github.com/webpack/webpack/issues/2163

Which looks like it might deal with the issue you are referring to

This comment from the team seems to indicate that they went with import() over System.import
We talked about this at our last meeting.

Since we need a way to define split points in ES2015 modules but we also can't wait for the TC to confirm the spec before releasing webpack 2, we decided to use import() instead of System.import() to mark split points. I think, this makes sense since we know that the current syntax (System.import()) will be wrong anyway. So let's stick with the most likely (although we can't guarantee it).

Give that a try and see if it works for you.
0
 
LVL 9

Author Closing Comment

by:Seven price
ID: 42055726
Thanks bro. It was very helpful
0
 
LVL 59

Expert Comment

by:Julian Hansen
ID: 42056048
You are welcome.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question