You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello @Gomah, after trying include a stencil lib using path.resolve(), the nuxt-stencil can't find the module.
The problem is because the Windows use \ and not /, so your plugin.ts, is generate this file:
With this, I get this response:
But, if I replace \ to /, works fine.
I have an idea how to fix it, if you agree, I can make a PR :)
Steps for to reproduce:
1- Add any stencil lib or component in the static folder.
2- Make the configuration using the path module.
3- run npm run dev
4- check the terminal and stencil.js in .nuxt/stencil.js.
My nuxt.config.js:
// const locales = require('./lang');importpathfrom'path';importlocalesfrom'./lang/index';exportdefault{mode: 'spa',/* ** Headers of the page */head: {title: '',meta: [{charset: 'utf-8'},{name: 'viewport',content: 'width=device-width, initial-scale=1'},{hid: 'description',name: 'description',content: process.env.npm_package_description||''},],link: [{rel: 'icon',type: 'image/x-icon',href: '/favicon.ico'},],},/* ** Customize the progress-bar color */loading: {color: '#fff'},/* ** Global CSS */css: [],/* ** Plugins to load before mounting the App */plugins: [],/* ** Nuxt.js dev-modules */buildModules: ['@nuxt/typescript-build'],/* ** Nuxt.js modules */modules: [['nuxt-i18n',{
locales,lazy: true,langDir: 'lang/',strategy: 'prefix',defaultLocale: 'pt-br',}],'nuxt-stencil',],/* ** Build configuration */build: {/* ** You can extend webpack config here */extend(config,ctx){},babel: {plugins: [['@babel/plugin-proposal-decorators',{legacy: true}],['@babel/plugin-proposal-class-properties',{loose: true}],],},},stencil: {/** * Required options */// Your library name, or the path to its root folder.lib: 'nuiverse-ui',// By default, it takes the lib name. e.g: bulmil/dist/hydratehydratePath: path.join(__dirname,'./static/nuiverse-ui/dist/hydrate'),// By default, it takes the lib name. e.g: bulmil/dist/loaderloaderPath: path.join(__dirname,'./static/nuiverse-ui/dist/loader'),// The prefix to whitelistprefix: 'nv-',},};
My environment:
OS: Windows 10 x64 Version 1903
Node: 10.16.3
NPM: 6.9.0
Nuxt: 2.0.0
nuxt-stencil: 0.1.1
The text was updated successfully, but these errors were encountered:
Hello @Gomah, after trying include a stencil lib using
path.resolve()
, the nuxt-stencil can't find the module.The problem is because the Windows use
\
and not/
, so yourplugin.ts
, is generate this file:With this, I get this response:
But, if I replace
\
to/
, works fine.I have an idea how to fix it, if you agree, I can make a PR :)
Steps for to reproduce:
1- Add any stencil lib or component in the
static
folder.2- Make the configuration using the
path module
.3- run
npm run dev
4- check the terminal and stencil.js in
.nuxt/stencil.js
.My nuxt.config.js:
My environment:
OS: Windows 10 x64 Version 1903
Node: 10.16.3
NPM: 6.9.0
Nuxt: 2.0.0
nuxt-stencil: 0.1.1
The text was updated successfully, but these errors were encountered: