Skip to content

Commit

Permalink
Merge pull request #225 from core-ds/fix/import-js-from-mjs
Browse files Browse the repository at this point in the history
fix((webpack): allow not fully specified paths in mjs dependencies
  • Loading branch information
heymdall-legal authored Jun 14, 2024
2 parents 412c9a6 + f62c2c8 commit e584d70
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/unlucky-moose-exist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'arui-scripts': patch
---

Поправлена загрузка js файлов из mjs кода зависимостей. babel-runtime добавляется не как fully specified path, из-за этого при работе с некоторыми библиотеками могли возникать проблемы
3 changes: 3 additions & 0 deletions packages/arui-scripts/src/configs/webpack.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,9 @@ export const createSingleClientWebpackConfig = (
test: /\.(js|mjs)$/,
exclude: /@babel(?:\/|\\{1,2})runtime/,
loader: require.resolve('babel-loader'),
resolve: {
fullySpecified: false,
},
options: {
...babelDependencies,
babelrc: false,
Expand Down
3 changes: 3 additions & 0 deletions packages/arui-scripts/src/configs/webpack.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ export const createServerConfig = (mode: 'dev' | 'prod'): Configuration => ({
test: /\.(js|mjs)$/,
exclude: /@babel(?:\/|\\{1,2})runtime/,
loader: require.resolve('babel-loader'),
resolve: {
fullySpecified: false,
},
options: {
...babelDependencies,
babelrc: false,
Expand Down

0 comments on commit e584d70

Please sign in to comment.