aurelia / new

The Aurelia 2 scaffolding repo used by our tools to setup new projects.
MIT License
35 stars 18 forks source link

Update webpack.config.js #76

Closed brandonseydel closed 2 years ago

brandonseydel commented 2 years ago

Need to change to mjs for package resolution since we changed our building strategy.

3cp commented 2 years ago

@brandonseydel I saw there is some trouble in your hmr code. Pls don't generate ts code, just generate plain js code.

Otherwise, babel setup will fail.

SyntaxError: /tmp/test-skeletons/app-latest-webpack-babel-css-no-unit-tests-cypress-app-min-browser-evergreen/src/my-app.js: Unexpected token, expected "," (10:16)
[84](https://github.com/aurelia/new/runs/6334581493?check_suite_focus=true#step:5:84)

[85](https://github.com/aurelia/new/runs/6334581493?check_suite_focus=true#step:5:85)
   8 |
[86](https://github.com/aurelia/new/runs/6334581493?check_suite_focus=true#step:5:86)
   9 |     const controllers = [];
[87](https://github.com/aurelia/new/runs/6334581493?check_suite_focus=true#step:5:87)
> 10 |     if ((module as any).hot) {
3cp commented 2 years ago

@bigopon resolving those dev dist files is just for the core devs?

We probably should not expose this in a user facing skeleton.

bigopon commented 2 years ago

@3cp agree, maybe can just move all those to our webpack plugin.

3cp commented 2 years ago

Currently au2 does not have a webpack plugin, it's just a loader.