Compare commits
4 Commits
v4.0.2-dev
...
v4.1.0-dev
Author | SHA1 | Date |
---|---|---|
semantic-release-bot | 5835d7cf66 | |
Derrick Hammer | 30554e2dfe | |
Derrick Hammer | 57ef73d9dc | |
Derrick Hammer | 70a531e5aa |
12
CHANGELOG.md
12
CHANGELOG.md
|
@ -1,3 +1,15 @@
|
|||
# [4.1.0-develop.1](https://git.lumeweb.com/LumeWeb/presetter-preset-rollup/compare/v4.0.2-develop.12...v4.1.0-develop.1) (2023-07-02)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* inject browser options into node-resolve plugin if config.browser is true ([70a531e](https://git.lumeweb.com/LumeWeb/presetter-preset-rollup/commit/70a531e5aa88a68afb67b0ff7902fcfda2d6c298))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add plugin-wasm ([57ef73d](https://git.lumeweb.com/LumeWeb/presetter-preset-rollup/commit/57ef73d9dcfcd835932db0393912eec770c22269))
|
||||
|
||||
## [4.0.2-develop.12](https://git.lumeweb.com/LumeWeb/presetter-preset-rollup/compare/v4.0.2-develop.11...v4.0.2-develop.12) (2023-07-02)
|
||||
|
||||
|
||||
|
|
|
@ -19,3 +19,5 @@ plugins:
|
|||
- inject:
|
||||
insertAt: top
|
||||
- '@apply rollup-plugin-visualizer[visualizer]'
|
||||
- - '@apply @rollup/plugin-wasm[default]'
|
||||
- targetEnv: auto-inline
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@lumeweb/presetter-preset-rollup",
|
||||
"version": "4.0.2-develop.12",
|
||||
"version": "4.1.0-develop.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@lumeweb/presetter-preset-rollup",
|
||||
"version": "4.0.2-develop.12",
|
||||
"version": "4.1.0-develop.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"presetter-preset-strict": "^4.0.1",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@lumeweb/presetter-preset-rollup",
|
||||
"version": "4.0.2-develop.12",
|
||||
"version": "4.1.0-develop.1",
|
||||
"description": "An opinionated presetter preset for using rollup as a bundler",
|
||||
"keywords": [
|
||||
"presetter",
|
||||
|
|
|
@ -75,7 +75,31 @@ export default function (): PresetAsset {
|
|||
noSymlinks: ['rollup.config.ts'],
|
||||
supplementaryConfig: {
|
||||
'gitignore': ['/rollup.config.ts'],
|
||||
'rollup': resolve(CONFIGS, 'rollup.yaml'),
|
||||
'rollup': (context) => {
|
||||
const content = loadFile(resolve(CONFIGS, 'rollup.yaml')) as any;
|
||||
if (context.custom.config.browser) {
|
||||
let plugins = content.plugins.map((item) =>
|
||||
Array.isArray(item) ? item[0] : item,
|
||||
);
|
||||
|
||||
let resolvePluginName = plugins.filter((item) =>
|
||||
item.includes('node-resolve'),
|
||||
);
|
||||
|
||||
if (resolvePluginName.length) {
|
||||
const index = plugins.indexOf(resolvePluginName[0]);
|
||||
if (!Array.isArray(content.plugins[index])) {
|
||||
content.plugins[index] = [content.plugins[index], {}];
|
||||
}
|
||||
|
||||
content.plugins[index][1] = {
|
||||
browser: true,
|
||||
preferBuiltins: false,
|
||||
};
|
||||
}
|
||||
}
|
||||
return content;
|
||||
},
|
||||
'tsconfig': {
|
||||
compilerOptions: {
|
||||
moduleResolution: 'nodenext',
|
||||
|
|
Loading…
Reference in New Issue