-
-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d18322b
commit 0c05c0f
Showing
11 changed files
with
52 additions
and
58 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,7 @@ | ||
--- | ||
'@web/dev-server': minor | ||
'@web/dev-server-storybook': minor | ||
'@web/test-runner': minor | ||
--- | ||
|
||
update to node-resolve v11 |
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,5 @@ | ||
--- | ||
'rollup-plugin-workbox': minor | ||
--- | ||
|
||
update to node-resolve v11 |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { fromRollup } from '@web/dev-server-rollup'; | ||
import rollupNodeResolve, { RollupNodeResolveOptions } from '@rollup/plugin-node-resolve'; | ||
import deepmerge from 'deepmerge'; | ||
|
||
export function nodeResolvePlugin( | ||
rootDir: string, | ||
preserveSymlinks?: boolean, | ||
userOptions?: RollupNodeResolveOptions, | ||
) { | ||
const nodeResolve = fromRollup(rollupNodeResolve, { preserveSymlinks }); | ||
const userOptionsObject = typeof userOptions === 'object' ? userOptions : {}; | ||
const options: RollupNodeResolveOptions = deepmerge( | ||
{ | ||
rootDir, | ||
extensions: ['.mjs', '.js', '.cjs', '.jsx', '.json', '.ts', '.tsx'], | ||
moduleDirectories: ['node_modules', 'web_modules'], | ||
// allow resolving polyfills for nodejs libs | ||
preferBuiltins: false, | ||
}, | ||
userOptionsObject, | ||
); | ||
|
||
return nodeResolve(options); | ||
} |
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