-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
Lazy bundle broken after uglified. #74
Comments
That's quite odd. We'll investigate. It might be that lazy loading .HTML templates doesn't quite work as it's supposed to. Also, note that you don't need to define the bundle or laziness in both places, one is enough (either the or package.json). |
Thanks for the reply. I just forgot to mention I did use one way at a time. And the template lazy property is quite neat to use, hope we can use it soon enough :) PS: Also a quick dumb question, I asked several times in Gitter but no luck to get a working answer... |
Not sure I understand your question in the PS. Could you rephrase or provide an example? |
Thank you for your reply. And sorry for my poor English... Here's some configurations to clear my question. Basically I am trying to get multiple entries work. There are multiple different entries in the website using Aurelia, so I wish I can let user just download Aurelia commons chunks only once. Here's the config from skeleton navigation webpack esnext version: entry: {
'app': [/* this is filled by the aurelia-webpack-plugin */],
'app2': [], //<--- for instance, I want to add another entry and use the same Aurelia commons chunks
'aurelia-bootstrap': coreBundles.bootstrap,
'aurelia': coreBundles.aurelia.filter(pkg => coreBundles.bootstrap.indexOf(pkg) === -1)
},
output: {
path: outDir,
} And I'm even failed when trying to make the config work in README: var AureliaWebpackPlugin = require('aurelia-webpack-plugin');
var webpackConfig = {
entry: 'index.js', //<--- how to tell Aurelia webpack plugin this is my entry?
output: {
path: 'dist',
filename: 'index_bundle.js'
},
plugins: [new AureliaWebpackPlugin()]
} So, any chance I could have multiple entries? |
@namelos I'm working on something that will simplify your use case. Stay tuned. |
@niieani Is this also part of the upcoming new webpack skeleton? |
@EisenbergEffect I'll keep this one in mind when working on the new webpack plugin/skeleton. |
Fixed by aurelia/skeleton-navigation#714 |
I'm submitting a bug report
1.1.0
Please tell us about your environment:
Operating System:
OSX 10.x
Node Version:
6.2.0
NPM Version:
3.8.9
JSPM OR Webpack AND Version
webpack 2.1.0-beta.17
Browser:
Chrome XX
Language:
ESNext
Current behavior:
I was trying to lazy load some of my resources. So I cloned a brand new skeletion navigation, and choose esnext-webpack. When I:
{ "path": "users", "lazy": true, "bundle": "users" }
in package.json aurelia.bulid.resources<require from="./users" lazy bundle="users"></require>
They just works fine in development env which don't uglify my code.
However, When I build in production env or just add a uglify in development build, they both crashes, before starting new resource request.
Error message:
Template markup must be wrapped in a <template> element e.g. <template> <!-- markup here --> </template>
The text was updated successfully, but these errors were encountered: