fix(webpack): set module: true for swcMinify (#19213)

This commit is contained in:
Jack Hsu 2023-09-18 11:53:32 -04:00 committed by GitHub
parent 0ec1bddab4
commit 56481d6976
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -25,8 +25,7 @@ describe('Web Components Applications', () => {
beforeEach(() => newProject()); beforeEach(() => newProject());
afterEach(() => cleanupProject()); afterEach(() => cleanupProject());
// TODO Re-enable this when it is passing. it('should be able to generate a web app', async () => {
xit('should be able to generate a web app', async () => {
const appName = uniq('app'); const appName = uniq('app');
runCLI( runCLI(
`generate @nx/web:app ${appName} --bundler=webpack --no-interactive` `generate @nx/web:app ${appName} --bundler=webpack --no-interactive`

View File

@ -271,6 +271,7 @@ export function withNx(pluginOptions?: WithNxOptions): NxWebpackPlugin {
minify: TerserPlugin.swcMinify, minify: TerserPlugin.swcMinify,
// `terserOptions` options will be passed to `swc` // `terserOptions` options will be passed to `swc`
terserOptions: { terserOptions: {
module: true,
mangle: false, mangle: false,
}, },
}), }),