Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit c08ae47

Browse files
committed
chore: remove esm option and improve nuxt.config.js
1 parent 916f288 commit c08ae47

File tree

5 files changed

+153
-357
lines changed

5 files changed

+153
-357
lines changed

packages/cna-template/template/_.eslintrc.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,5 @@ module.exports = {
2828
],
2929
<%_ } _%>
3030
// add your custom rules here
31-
rules: {
32-
<%_ if (!esm){ _%>
33-
'nuxt/no-cjs-in-config': 'off'
34-
<%_ } _%>
35-
}
31+
rules: {}
3632
}

packages/cna-template/template/nuxt/nuxt.config.js

+6-23
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
1-
<%_ if (esm) { _%>
2-
<%_ if (ui === 'vuetify') { _%>
3-
import colors from 'vuetify/es5/util/colors'
4-
<%_ } _%>
5-
<%_ } else { _%>
6-
<%_ if (ui === 'vuetify') { _%>
7-
const colors = require('vuetify/es5/util/colors').default
8-
<%_ } _%>
1+
<%_ if (ui === 'vuetify') { _%>import colors from 'vuetify/es5/util/colors'
92
<%_ } _%>
103

11-
<%_ if (esm) { _%>
124
export default {
13-
<%_ } else { _%>
14-
module.exports = {
15-
<%_ } _%>
5+
// https://nuxtjs.org/api/configuration-mode
166
mode: '<%= mode %>',
177
/*
188
** Headers of the page
9+
** https://nuxtjs.org/api/configuration-head
1910
*/
2011
head: {
2112
<%_ if (ui === 'vuetify') { _%>
@@ -39,10 +30,6 @@ module.exports = {
3930
]
4031
},
4132
/*
42-
** Customize the progress-bar color
43-
*/
44-
loading: { color: '#fff' },
45-
/*
4633
** Global CSS
4734
*/
4835
css: [
@@ -62,6 +49,7 @@ module.exports = {
6249
],
6350
/*
6451
** Plugins to load before mounting the App
52+
** https://nuxtjs.org/guide/plugins
6553
*/
6654
plugins: [
6755
<%_ if (ui === 'element-ui') { _%>
@@ -129,8 +117,7 @@ module.exports = {
129117
** Axios module configuration
130118
** See https://axios.nuxtjs.org/options
131119
*/
132-
axios: {
133-
},
120+
axios: {},
134121
<%_ } _%>
135122
<%_ if (ui === 'vuetify') { _%>
136123
/*
@@ -157,6 +144,7 @@ module.exports = {
157144
<%_ } _%>
158145
/*
159146
** Build configuration
147+
** https://nuxtjs.org/api/configuration-build
160148
*/
161149
build: {
162150
<%_ if (ui === 'bulma') { _%>
@@ -170,10 +158,5 @@ module.exports = {
170158
<%_ } else if (ui === 'element-ui') { _%>
171159
transpile: [/^element-ui/],
172160
<%_ } _%>
173-
/*
174-
** You can extend webpack config here
175-
*/
176-
extend (config, ctx) {
177-
}
178161
}
179162
}

packages/create-nuxt-app/lib/saofile.js

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ module.exports = {
3434
lintStaged,
3535
stylelint,
3636
axios,
37-
esm: true,
3837
edge,
3938
pm,
4039
pmRun,

0 commit comments

Comments
 (0)