Skip to content

Commit c3539c5

Browse files
authored
feat: add modern build plugin (#83)
1 parent 17aa983 commit c3539c5

35 files changed

+848
-287
lines changed

examples/gene/CHANGELOG.md

Lines changed: 0 additions & 151 deletions
This file was deleted.

examples/gene/src/components/Hello.vue

Lines changed: 0 additions & 11 deletions
This file was deleted.

examples/gene/src/components/Home.vue

Lines changed: 0 additions & 11 deletions
This file was deleted.

examples/gene/src/router.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

examples/next/.browserslistrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
chrome 10

examples/gene/package.json renamed to examples/next/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "gene",
2+
"name": "next",
33
"private": true,
44
"version": "1.4.1",
55
"description": "",
@@ -16,6 +16,7 @@
1616
"license": "MIT",
1717
"devDependencies": {
1818
"@nut-project/presets-alpha": "^1.0.0-alpha.18",
19+
"@nut-plugins/modern-build": "^1.0.0-alpha.0",
1920
"vue-server-renderer": "^2.6.10",
2021
"vue-template-compiler": "^2.6.10"
2122
},

examples/gene/pages.config.js renamed to examples/next/pages.config.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,25 @@ module.exports = function ( ctx ) {
66
return {
77
config: {
88
webpack: {
9+
minimize: false,
910
entry: path.join( __dirname, 'src/entry-client.js' ),
1011
output: {},
1112
devServer: {
1213
port: 9000,
1314
historyApiFallback: true,
1415
},
15-
cache: false,
16+
cache: true,
17+
constants: {
18+
HELLO: JSON.stringify( 'world!!!' )
19+
}
1620
}
1721
},
1822

1923
plugins: {
24+
modernBuild: {
25+
resolve: '@nut-plugins/modern-build',
26+
options: {},
27+
},
2028
rem: {
2129
resolve: require.resolve( './plugins/plugin-rem' ),
2230
options: {
File renamed without changes.
File renamed without changes.

examples/gene/src/app.vue renamed to examples/next/src/app.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,9 @@
88
export default {
99
}
1010
</script>
11+
12+
<style>
13+
body {
14+
color: blue;
15+
}
16+
</style>

0 commit comments

Comments
 (0)