Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[v2.0.0] Remove experimentalOptimizeChunks (#3343)
* [v2.0.0] Update minimum required Node version to 10 (#3346) * Update CI to only run on Node 10 and 12, add engines to package.json * Update TypeScript target * Remove Bublé as a transpilation option from tests (it is still needed in sourcemap tests) * Remove minNodeVersion form tests * Reformat package.json * [v2.0.0] Bundle chokidar (#3331) * Create a separate chunk for watch mode via a dynamic import * Bundle chokidar * Handle conditional fsevents import * Only run tests on Node 10 and 12 as we want to do this anyway and chokidar depends on utils.promisify * Improve chunking * Refactor and simplify watcher * Make watcher a proper parameter * Only unwatch and watch on Linux systems * No longer run JS files through TypeScript for improved bundling performance * [v2.0.0] Remove active deprecations (#3352) * Remove active deprecations * Make inactive deprecations active * Improve coverage * Improve coverage * Refine transformer * Improve coverage * Refactoring option normalization * Improve coverage * Remove experimentalOptimizeChunks * Remove more unused code
- Loading branch information
1 parent
54220eb
commit 4132844
Showing
68 changed files
with
68 additions
and
716 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const expectedAcornImport = "import acorn, { Parser } from 'acorn';"; | ||
const newAcornImport = "import * as acorn from 'acorn';\nimport { Parser } from 'acorn';"; | ||
|
||
// by default, rollup-plugin-commonjs will translate require statements as default imports | ||
// which can cause issues for secondary tools that use the ESM version of acorn | ||
export default function fixAcornEsmImport() { | ||
let found = false; | ||
|
||
return { | ||
name: 'fix-acorn-esm-import', | ||
renderChunk(code) { | ||
return code.replace(expectedAcornImport, () => { | ||
found = true; | ||
return newAcornImport; | ||
}); | ||
}, | ||
writeBundle() { | ||
if (!found) { | ||
this.error('Could not find expected acorn import, please examine generated code.'); | ||
} | ||
} | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.