Closed nashwaan closed 7 years ago
@seanlandsman I'll try to look at this today
I've recreate a webpack loader issue here https://github.com/swalters/agGridAureliaWebpack and am waiting for feedback from Aurelia team
A temporary solution is to add following lines in webpack.config.js
const AureliaWebpackPlugin = require('aurelia-webpack-plugin');
...
.plugins = [
...
new AureliaWebpackPlugin.ModuleDependenciesPlugin({
'ag-grid-aurelia': [
'./lib/agGridAurelia',
'./lib/agGridColumn',
'./lib/agTemplate'
]
}),
As the issue over at aurelia/webpack-plugin has been fixed I assume that this has been fixed too
If this is still an issue please open a new issue and I'll investigate
thanks
I'm submitting a ... (check one with "x")
Current behavior Using
aurelia.use.plugin('ag-grid-aurelia');
inexport function configure(aurelia) {}
will not work with the newaurelia-webpack-plugin
v2 (currently 2.0.0-rc.1).Expected behavior Be able to load
ag-grid-aurelia
plugin without issues underaurelia-webpack-plugin
v2.Minimal reproduction of the problem with instructions Please download minimal Aurelia + Webpack setup from here. Then do the following simple steps.
npm install --save ag-grid ag-grid-aurelia
src/main.js
:To fix this error, I wrap it in
PLATFORM.moduleName()
. See more info aboutPLATFORM.moduleName()
as described by @jods4.However, the browser gives this error:
Uncaught (in promise) Error: Unable to find module with ID: ag-grid-aurelia/lib/agGridAurelia
I think internally,
ag-grid-library
is trying to loadag-grid-aurelia
module. If this is the case, then this as well need to be wrapped byPLATFORM.moduleName()
What is the motivation / use case for changing the behavior? As
aurelia-webpack-plugin
is upgrading to v2 (currently 2.0.0-rc.1),ag-grid-aurelia
will fail to load on webpack setups.Please tell us about your environment: Windows, VS Code, Webpack, Webpack Dev Server
ag-grid-aurelia version: 8.2.0
ag-Grid/ag-Grid-Enterprise version: 8.2.0
Aurelia version: 1.1.0
Browser: all
Language: all