Package no longer transpiled by Nuxt
rchl opened this issue · 2 comments
After f0241d4 Nuxt no longer transpiles this package when it's used on the client-side.
It's supposed to do that as it has ufo
in transpile
array by default: https://github.com/nuxt/nuxt.js/blob/777a4b7f5033c86c37cbd93008f3ca792e4af8bc/packages/webpack/src/config/base.js#L78-L78
It works with 0.7.9 version of the package but not 0.7.11.
I have verified that it's due to changing the browser export from index.js
to index.cjs
but not sure why as I'm not that familiar with babel/webpack. Manually renaming the file and reverting the export name in package.json
to index.js
makes it work again.
Oh, it's of course because the babel-loader is not set up for cjs
extension in https://github.com/nuxt/nuxt.js/blob/777a4b7f5033c86c37cbd93008f3ca792e4af8bc/packages/webpack/src/config/base.js#L332-L332
Following up with a Nuxt issue.