Webpack loader and "new Worker" syntax #229
Answered
by
gildas-lormeau
JCarlesVilaseca
asked this question in
Q&A
-
Used in Angular 10 application it needs to use another loader. I would appreciate any help.
|
Beta Was this translation helpful? Give feedback.
Answered by
gildas-lormeau
Apr 10, 2021
Replies: 2 comments 1 reply
This comment has been hidden.
This comment has been hidden.
-
Here is the procedure to integrate
"architect": {
"build": {
"builder": "@angular-builders/custom-webpack:browser",
"options": {
"customWebpackConfig": {
"path": "./custom-webpack.config.js"
},
...
"serve": {
"builder": "@angular-builders/custom-webpack:dev-server",
...
const webpack = require('webpack');
module.exports = {
module: {
rules: [
{
test: /\.js$/,
loader: require.resolve('@open-wc/webpack-import-meta-loader')
}
]
}
}; |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
gildas-lormeau
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here is the procedure to integrate
webpack-import-meta-loader
in Angular 10 (copied from #191 (comment)).npm install -D @angular-builders/custom-webpack
npm install -D @open-wc/webpack-import-meta-loader
angular.json
file:custom-webpack.config.js
with the following content: