sysgears / spinjs

SpinJS is now Zen! The project has been renamed and moved to Larix Framework.
https://github.com/sysgears/larix/tree/master/packages/zen
MIT License
43 stars 8 forks source link

webpack 4 compatibility issue #1

Closed veeramarni closed 6 years ago

veeramarni commented 6 years ago

webpack 4 favors .mjs over .js files and applies stricter rules when dealing with Harmony modules.

image

The following is what suggested to use.

{
  test: /\.mjs$/,
  include: /node_modules/,
  type: "javascript/auto",
},

Should the spinjs handle .mjs files as well?

larixer commented 6 years ago

@veeramarni Yes, I think yes

larixer commented 6 years ago

@veeramarni Published spinjs@0.4.151, it adds the block you have proposed into webpack config by default.