Skip to content

Commit

Permalink
feat(web): added javascriptEnabled option for @nrwl/web:rollup (#8327)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyzyl-ool committed Jun 10, 2022
1 parent a42d681 commit c421324
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/generated/packages/web.json
Expand Up @@ -752,6 +752,11 @@
"enum": ["babel", "swc"],
"default": "babel",
"description": "Which compiler to use."
},
"javascriptEnabled": {
"type": "boolean",
"description": "Sets `javascriptEnabled` option for less loader",
"default": false
}
},
"required": ["tsConfig", "project", "entryFile", "outputPath"],
Expand Down
5 changes: 5 additions & 0 deletions packages/web/src/executors/rollup/rollup.impl.ts
Expand Up @@ -220,6 +220,11 @@ export function createRollupOptions(
extract: options.extractCss,
autoModules: true,
plugins: [autoprefixer],
use: {
less: {
javascriptEnabled: options.javascriptEnabled,
},
},
}),
resolve({
preferBuiltins: true,
Expand Down
1 change: 1 addition & 0 deletions packages/web/src/executors/rollup/schema.d.ts
Expand Up @@ -22,4 +22,5 @@ export interface WebRollupOptions {
deleteOutputPath?: boolean;
format: string[];
compiler?: Compiler;
javascriptEnabled?: boolean;
}
5 changes: 5 additions & 0 deletions packages/web/src/executors/rollup/schema.json
Expand Up @@ -114,6 +114,11 @@
"enum": ["babel", "swc"],
"default": "babel",
"description": "Which compiler to use."
},
"javascriptEnabled": {
"type": "boolean",
"description": "Sets `javascriptEnabled` option for less loader",
"default": false
}
},
"required": ["tsConfig", "project", "entryFile", "outputPath"],
Expand Down

1 comment on commit c421324

@vercel
Copy link

@vercel vercel bot commented on c421324 Jun 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-five.vercel.app
nx-dev-git-master-nrwl.vercel.app
nx-dev-nrwl.vercel.app
nx.dev

Please sign in to comment.