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

remove json.stringify which causes errors #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

remove json.stringify which causes errors #1

wants to merge 3 commits into from

Conversation

green3g
Copy link

@green3g green3g commented Jun 20, 2017

The json.stringify makes the code fail when using webpack 3 with canjs 3.x. Not sure its even necessary for 2.x.

For instance if I have a component with this:

<p class="hello"><content /></p>

The output looks like this:
<p class=\\\\"hello\\\\"><content /></p>

@green3g
Copy link
Author

green3g commented Jun 20, 2017

Also make plugin use canjs 3.x

@macku
Copy link
Contributor

macku commented Jun 23, 2017

Hi @roemhildtg, thanks for contributing. Let me check the changes before merging.
I've created this loader for one of the project's that is based on CanJS 2 and WebPack 2+, that's why it might be not compatible with either CanJS 3 or WebPack 3.`

@green3g
Copy link
Author

green3g commented Jun 23, 2017

If you want to leave it at v 2.x that is fine with me, I can publish a new package and use that instead. I think it would make sense though, to give it a new major version and publish the same package with a new version.

@macku
Copy link
Contributor

macku commented Jun 27, 2017

@roemhildtg I did check your Pull Request with CanJS3 and WebPack3. Based on that I think I cannot remove JSON.stringify from the source code. Without stringifying and escaping the content of the stache template file WebPack will not compile it.

You can check the example usage and configuration of WebPack here: https://github.com/macku/canjs-webpack-demo
Here are the changes applied for the loader. Mostly it's just a clean-up: https://github.com/macku/can-stache-loader/commits/canjs3-webpack3

You can try to use beta release v1.0.0-beta and check how it works with your config.

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