Skip to content

Commit 8a7511b

Browse files
committed
Add more details for the @woocommerce/data workaround in webpack.config.js
Address #1073 (comment)
1 parent e5cf5bd commit 8a7511b

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

webpack.config.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,17 @@ const webpackConfig = {
7676
alias: {
7777
'.~': path.resolve( process.cwd(), 'js/src/' ),
7878
},
79-
// Resolve jsx/tsx files for `@woocommerce/data`...`/with-plugins-hydration`
79+
/**
80+
* Resolve jsx/tsx files for `@woocommerce/[email protected].*`.
81+
*
82+
* It could be removed if one of conditions is met:
83+
* - The L-2 support version no longer covers 1.3.* versions.
84+
* - `@woocommerce/data` is imported from DEWP instead.
85+
*
86+
* Checking method:
87+
* Whether the module not found error of the below path is no longer occur after `npm start`.
88+
* - `./node_modules/@woocommerce/data/build/plugins/with-plugins-hydration.js`
89+
*/
8090
extensions: [ '.ts', '.tsx', '.js', '.jsx', '.json' ],
8191
},
8292
plugins: [

0 commit comments

Comments
 (0)