Skip to content

Commit ebfdbf3

Browse files
committed
chore: remove alias setting and let example use package directly
1 parent 273569c commit ebfdbf3

File tree

5 files changed

+92
-7
lines changed

5 files changed

+92
-7
lines changed

example-plugin-app/package-lock.json

Lines changed: 42 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example-plugin-app/webpack.dev.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ module.exports = createConfig('webpack-dev', {
88
// applications. Because this example app is using code from the parent frontend-plugin-framework
99
// library, it runs into the same issues our applications do when loading libraries from
1010
// local source, rather than from their node_modules directory.
11-
'@openedx/frontend-plugin-framework': path.resolve(__dirname, '..', 'src/plugins'),
11+
'@openedx/frontend-plugin-framework': path.resolve(__dirname, '..', 'dist'),
1212
react: path.resolve(__dirname, 'node_modules', 'react'),
1313
'react-dom': path.resolve(__dirname, 'node_modules', 'react-dom'),
1414
'react-router-dom': path.resolve(__dirname, 'node_modules', 'react-router-dom'),
1515
},
1616
},
1717
devServer: {
18-
port: 8081,
18+
port: 8082,
1919
allowedHosts: 'all',
2020
},
2121
});

example/package-lock.json

Lines changed: 45 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"author": "edX",
1313
"license": "AAGPL-3.0",
1414
"dependencies": {
15+
"@openedx/frontend-plugin-framework": "file:..",
1516
"core-js": "^3.29.1",
1617
"prop-types": "^15.8.1",
1718
"react": "^17.0.0",

example/webpack.dev.config.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,8 @@ const { createConfig } = require('@openedx/frontend-build');
44
module.exports = createConfig('webpack-dev', {
55
resolve: {
66
alias: {
7-
// Note: these four aliases are a manual version of what module.config.js solves in our
8-
// applications. Because this example app is using code from the parent frontend-plugin-framework
9-
// library, it runs into the same issues our applications do when loading libraries from
10-
// local source, rather than from their node_modules directory.
11-
'@openedx/frontend-plugin-framework': path.resolve(__dirname, '..', 'src/plugins'),
7+
// Note: these 3 aliases are a manual version of what module.config.js solves in our
8+
// applications.
129
react: path.resolve(__dirname, 'node_modules', 'react'),
1310
'react-dom': path.resolve(__dirname, 'node_modules', 'react-dom'),
1411
'react-router-dom': path.resolve(__dirname, 'node_modules', 'react-router-dom'),

0 commit comments

Comments
 (0)